<template>
	<view style="padding-bottom: 160upx;">
		<view v-show="!VehicleIsNewCar" class="zcModel-card-item uni-flex zcAlignI_center zcJustifyC_between">
			<view>城市：<view>{{VehicleOwnerCity}}</view></view>
			<view>车牌：<view>{{VehiclePlateNo}}</view></view>
		</view>
		<navigator :url="VehicleIsNewCar?'../customer/customer?VehicleInfoSN='+VehicleInfoSN:'../customer/customer?VehiclePlateNo='+ VehiclePlateNo" >
			<view class="zcModel-title zcJustifyC_between">车辆和车主信息<view class="iconfont icon-bianji uni-flex zcAlignI_center">修改</view></view>
		</navigator>
		<block v-for="(item1,idx1) in items1" :key="idx1" >
			<zc-card v-if="!VehicleIsNewCar&&(idx1 !== 0) || VehicleIsNewCar" :zcIndex="idx1" :cardItem="item1" @zcChengeValue="zcChangeValue1"></zc-card>
		</block>
		
		<view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
			<view class="zcPicker-titel">使用性质：</view>
			<view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after">
				<picker mode="selector" :value="picker1.index" :range="picker1.lists" @change="(event) =>pickerChange1(1,event)">
					<view v-if="picker1.lists[picker1.index]" class="uni-input">{{picker1.lists[picker1.index]}}</view>
                    <view v-else class="uni-input placeholder">必填</view>
				</picker>
			</view>
		</view>
        <view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
        	<view class="zcPicker-titel">购车付款方式：</view>
        	<view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after">
        		<picker mode="selector" :value="picker4.index" :range="picker4.lists" @change="(event) =>pickerChange1(4,event)">
        			<view v-if="picker4.lists[picker4.index]" class="uni-input">{{picker4.lists[picker4.index]}}</view>
                    <view v-else class="uni-input placeholder">必填</view>
        		</picker>
        	</view>
        </view>
        <view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
        	<view class="zcPicker-titel">转续保：</view>
        	<view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after">
        		<picker mode="selector" :value="picker5.index" :range="picker5.lists" @change="(event) =>pickerChange1(5,event)">
        			<view class="uni-input">{{picker5.lists[picker5.index]}}</view>
        		</picker>
        	</view>
        </view>
        <view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
        	<view class="zcPicker-titel">货车类型：</view>
        	<view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after">
        		<picker mode="selector" :value="picker6.index" :range="picker6.lists" @change="(event) =>pickerChange1(6,event)">
        			<view class="uni-input">{{picker6.lists[picker6.index]}}</view>
        		</picker>
        	</view>
        </view>
        <view class="uni-flex zcFlex_column">
            <view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
            	<view class="zcPicker-titel">本店销售：</view>
            </view>
            <view class="zcPicker-model uni-flex zcAlignI_center">
            	<radio-group @change="(event)=>zcChengeRadio(1,event)" class="uni-flex zcFlex_row zcAlignI_center">
            		<block v-for="(item,idx) in optionBoxsItem1.optionBoxs" :key="idx">
            			<label class="radio uni-flex zcJustifyC_center" style="margin-left: 30rpx;">
            				<radio :value="item.value" color="#3CA4FA" :checked="optionBoxsItem1.value===item.text" :style="{'transform':'scale(0.5)',}"/>{{item.text}}
            			</label>
            		</block>
                    <view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after" v-show="picker7.isShow">
                    	<picker mode="selector" :value="picker7.index" :range="picker7.lists" @change="(event) =>pickerChange1(7,event)">
                    		<view class="uni-input">{{picker7.lists[picker7.index]}}</view>
                    	</picker>
                    </view>
            	</radio-group>
            </view>
        </view>
        <view class="uni-flex zcFlex_column">
            <view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
            	<view class="zcPicker-titel">网约车类别：</view>
            </view>
            <view class="zcPicker-model uni-flex zcAlignI_center">
            	<radio-group @change="(event)=>zcChengeRadio(2,event)" class="uni-flex zcFlex_row zcAlignI_center">
            		<block v-for="(item,idx) in optionBoxsItem2.optionBoxs" :key="idx">
            			<label class="radio uni-flex zcJustifyC_center" style="margin-left: 30rpx;">
            				<radio :value="item.value" color="#3CA4FA" :checked="optionBoxsItem2.value===item.text" :style="{'transform':'scale(0.5)',}"/>{{item.text}}
            			</label>
            		</block>
                    <view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after" v-show="picker8.isShow">
                    	<picker mode="selector" :value="picker8.index" :range="picker8.lists" @change="(event) =>pickerChange1(8,event)">
                    		<view class="uni-input">{{picker8.lists[picker8.index]}}</view>
                    	</picker>
                    </view>
            	</radio-group>
            </view>
        </view>
		
		<block v-for="(item2,idx2) in items2" :key="idx2" >
			<zc-card :zcIndex="idx2" :cardItem="item2" @zcChengeValue="zcChangeValue2"></zc-card>
		</block>
		
		<view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
			<view class="zcPicker-titel">证件类型：</view>
			<view class="zcPicker-model-item iconfont icon-sanjiaojiantoutriangular-copy-after">
				<picker mode="selector" :value="picker3.index" :range="picker3.lists" @change="pickerChange3">
					<view class="uni-input">{{picker3.lists[picker3.index]}}</view>
				</picker>
			</view>
		</view>
		<block v-for="(item3,idx3) in items3" :key="idx3" >
			<zc-card :zcIndex="idx3" :cardItem="item3" @zcChengeValue="zcChangeValue3"></zc-card>
		</block>
		
		<view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
			<view class="zcPicker-titel">被保人信息：</view>
			<view class="zcPicker-model-item">
				<checkbox-group @change="oldCheckboxChange">
					<label class="checkbox">
						<checkbox value="同车主" :checked="isInsuredShow1" color="#FFFFFF" style="transform: scale(0.5);" />同车主
					</label>
				</checkbox-group>
			</view>
		</view>
		<view class="insured-model" v-show="!isInsuredShow1">
			<block v-for="(zcItem4,zcIdx4) in zcItems4" :key="zcIdx4" >
				<zc-card :zcIndex="zcIdx4" :cardItem="zcItem4" @zcChengeValue="zcOldChangeValue4"></zc-card>
			</block>
		</view>
		<view class="zcPicker-model uni-flex zcAlignI_center zcJustifyC_between">
			<view class="zcPicker-titel">投保人信息：</view>
			<view class="zcPicker-model-item">
				<checkbox-group @change="checkboxChange">
					<label class="checkbox">
						<checkbox value="同车主" :checked="isInsuredShow" color="#FFFFFF" style="transform: scale(0.5);" />同车主
					</label>
				</checkbox-group>
			</view>
		</view>
		<view class="insured-model" v-show="!isInsuredShow">
			<block v-for="(item4,idx4) in items4" :key="idx4" >
				<zc-card :zcIndex="idx4" :cardItem="item4" @zcChengeValue="zcChangeValue4"></zc-card>
			</block>
		</view>
		
		<view v-if="OrderLabel.length>0" class="zcModel-title zcJustifyC_between">订单标签</view>
		<block v-for="(item,index) in OrderLabel" :key="index">
			<view class="uni-flex zcFlex_column" style="background-color: #FFFFFF;border-bottom: 3px solid #f8f8f8;">
				<view class="uni-flex zcJustifyC_between zcAlignI_center" style="padding: 20upx;">
					{{item.title}}：
					<input class="uni-flex-item" disabled="true" style="margin: 0 30upx;" type="text" :value="item.aValue" />
					<view @tap="zcPopupShow(index,item.isShow)" class="iconfont icon-sanjiaojiantoutriangular-copy"></view>
				</view>
				<view v-show="item.isShow" class="popup_content">
					<block v-for="(item1,idx) in item.list" :key="idx">
						<view :data-popupId="index" class="popup_item" :class="{active:item.actives.indexOf(idx) !== (-1)}" :id="idx" :style="{'flex': '0 0 '+item.row+'%'}" @tap="doChenkItem">{{item1.Name}}</view>
					</block>
				</view>
			</view>
		</block>
		
		<view class="zcModel-title zcJustifyC_between">险种选择</view>
		<view class="zctab-bar-box">
			<tab-bar style="width: 100%;background-color: #FFFFFF;" :type="'zcStyle'" :tabBars="tabBar.tabBars" :tabIndex="tabBar.tabIndex" @tapTab="tapTab"></tab-bar>
			
			<view class="zcUni-tab-bar">
				<!-- <swiper :current="tabBar.tabIndex" class="swiper-box" :duration="300" @change="changeTab"> -->
					<!-- 单交强险种 选择栏 -->
					<view class="zc-tab-bar" v-show="0 === tabBar.tabIndex">
						<view v-show="insures.insure_traffic.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle">
							<checkbox-group @tap="pickerChangeTB2(insures,'traffic_check','',insures.insure_traffic.isCheck)" >
								<label class="checkbox">
									<checkbox :checked="insures.insure_traffic.isCheck" :disabled="true" style="transform: scale(0.5);"/>
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;">交强险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems[0].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="0" :cardItem="TCitems[0]" @zcChengeValue="zcChangeValueB" ></zc-card>
							</view>
						</view>
						
						<view v-show="insures.insure_traffic.isShow" class="zcModel-card-item uni-flex">
							<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
							<view v-if="!InsureTrafficIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(false)" >{{InsureTrafficComments?InsureTrafficComments:''}}</view>
							<textarea v-else-if="InsureTrafficIsAText" :focus="InsureTrafficIsFocus" :value="InsureTrafficComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,false)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
						</view>
						
						<view v-show="insures.insure_traffic.isCheck && insures.insure_traffic.isShow">
							<block v-for="(item,index1) in insures.insure_traffic.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures,'traffic_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures,'traffic_pay',index1,item.isFreePay)" >不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures,'traffic_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures,'traffic_picker','',event)" >
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
						<view v-show="insures.insure_biz.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle" >
							<checkbox-group @tap="pickerChangeTB2(insures,'biz_check','',insures.insure_biz.isCheck)" >
								<label class="checkbox">
									<checkbox :checked="insures.insure_biz.isCheck" :disabled="true" style="transform: scale(0.5);" />
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;" >商业险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems[1].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="1" :cardItem="TCitems[1]" @zcChengeValue="zcChangeValueB" ></zc-card>
							</view>
						</view>
						
                        <view v-show="insures.insure_biz.isShow" class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;color: #333333;flex: 1;">折扣：</view>
                            <view class="zcModel-card-item-stext uni-flex zcAlignI_center" style="width: 41%;">
                                <input type="digit" :value="InsureBizDiscount" @input="zcChangeDiscount" style="border-bottom: 1rpx solid #999999;margin-right: 26rpx;" />%
                            </view>
                        </view>
						<view v-show="insures.insure_biz.isShow" class="zcModel-card-item uni-flex">
							<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
							<view v-if="!InsureBizIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(true)" >{{InsureBizComments?InsureBizComments:''}}</view>
							<textarea v-else-if="InsureBizIsAText" :focus="InsureBizIsFocus" :value="InsureBizComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,true)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
						</view>
						
						<view v-show="insures.insure_biz.isCheck && insures.insure_biz.isShow">
							<block v-for="(item,index1) in insures.insure_biz.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures,'biz_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures,'biz_pay',index1,item.isFreePay)" >不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures,'biz_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures,'biz_picker','',event)" >
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
					</view>
					<!-- 经济型险种 选择栏 -->
					<view class="zc-tab-bar" v-show="1 === tabBar.tabIndex">
						
						<view v-show="insures1.insure_traffic.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle">
							<checkbox-group >
								<label class="checkbox" @tap="pickerChangeTB2(insures1,'traffic_check','',insures1.insure_traffic.isCheck)">
									<checkbox :checked="insures1.insure_traffic.isCheck" :disabled="true" style="transform: scale(0.5);"/>
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;">交强险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems1[0].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="0" :cardItem="TCitems1[0]" @zcChengeValue="zcChangeValueB1" ></zc-card>
							</view>
						</view>
                        
                        <view v-show="insures1.insure_traffic.isShow" class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
                        	<view v-if="!InsureTrafficIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(false)" >{{InsureTrafficComments?InsureTrafficComments:''}}</view>
                        	<textarea v-else-if="InsureTrafficIsAText" :focus="InsureTrafficIsFocus" :value="InsureTrafficComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,false)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
                        </view>
						
						<view v-show="insures1.insure_traffic.isCheck && insures1.insure_traffic.isShow">
							<block v-for="(item,index1) in insures1.insure_traffic.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures1,'traffic_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures1,'traffic_pay',index1,item.isFreePay)">不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures1,'traffic_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures1,'traffic_picker','',event)">
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
						<view v-show="insures1.insure_biz.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle" >
							<checkbox-group @tap="pickerChangeTB2(insures1,'biz_check','',insures1.insure_biz.isCheck)">
								<label class="checkbox">
									<checkbox :checked="insures1.insure_biz.isCheck" :disabled="true" style="transform: scale(0.5);" />
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;" >商业险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems1[1].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="1" :cardItem="TCitems1[1]" @zcChengeValue="zcChangeValueB1" ></zc-card>
							</view>
						</view>
						
                        <view v-show="insures1.insure_biz.isShow" class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;color: #333333;flex: 1;">折扣：</view>
                            <view class="zcModel-card-item-stext uni-flex zcAlignI_center" style="width: 41%;">
                                <input type="digit" :value="InsureBizDiscount" @input="zcChangeDiscount" style="border-bottom: 1rpx solid #999999;margin-right: 26rpx;" />%
                            </view>
                        </view>
						<view v-show="insures1.insure_biz.isShow" class="zcModel-card-item uni-flex">
							<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
							<view v-if="!InsureBizIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(true)" >{{InsureBizComments?InsureBizComments:''}}</view>
							<textarea v-else-if="InsureBizIsAText" :focus="InsureBizIsFocus" :value="InsureBizComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,true)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
						</view>
						
						<view v-show="insures1.insure_biz.isCheck && insures1.insure_biz.isShow">
							<block v-for="(item,index1) in insures1.insure_biz.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures1,'biz_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures1,'biz_pay',index1,item.isFreePay)" >不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures1,'biz_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures1,'biz_picker','',event)">
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
					</view>
					<!-- 无忧型险种 选择栏 -->
					<view class="zc-tab-bar" v-show="2 === tabBar.tabIndex">
						
						<view v-show="insures2.insure_traffic.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle">
							<checkbox-group @tap="pickerChangeTB2(insures2,'traffic_check','',insures2.insure_traffic.isCheck)"> 
								<label class="checkbox">
									<checkbox :checked="insures2.insure_traffic.isCheck" :disabled="true" style="transform: scale(0.5);"/>
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;">交强险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems2[0].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="0" :cardItem="TCitems2[0]" @zcChengeValue="zcChangeValueB2" ></zc-card>
							</view>
						</view>
                        
                        <view v-show="insures2.insure_traffic.isShow" class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
                        	<view v-if="!InsureTrafficIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(false)" >{{InsureTrafficComments?InsureTrafficComments:''}}</view>
                        	<textarea v-else-if="InsureTrafficIsAText" :focus="InsureTrafficIsFocus" :value="InsureTrafficComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,false)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
                        </view>
						
						<view v-show="insures2.insure_traffic.isCheck && insures2.insure_traffic.isShow">
							<block v-for="(item,index1) in insures2.insure_traffic.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures2,'traffic_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures2,'traffic_pay',index1,item.isFreePay)" >不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures2,'traffic_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures2,'traffic_picker','',event)">
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
						<view v-show="insures2.insure_biz.isShow" class="zcJustifyC_between zcAlignI_center zcBizStyle" >
							<checkbox-group @tap="pickerChangeTB2(insures2,'biz_check','',insures2.insure_biz.isCheck)" >
								<label class="checkbox">
									<checkbox :checked="insures2.insure_biz.isCheck" :disabled="true" style="transform: scale(0.5);" />
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;" >商业险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="TCitems2[1].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="1" :cardItem="TCitems2[1]" @zcChengeValue="zcChangeValueB2" ></zc-card>
							</view>
						</view>
						
                        <view v-show="insures2.insure_biz.isShow" class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;color: #333333;flex: 1;">折扣：</view>
                            <view class="zcModel-card-item-stext uni-flex zcAlignI_center" style="width: 41%;">
                                <input type="digit" :value="InsureBizDiscount" @input="zcChangeDiscount" style="border-bottom: 1rpx solid #999999;margin-right: 26rpx;" />%
                            </view>
                        </view>
						<view v-show="insures2.insure_biz.isShow" class="zcModel-card-item uni-flex">
							<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
							<view v-if="!InsureBizIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(true)" >{{InsureBizComments?InsureBizComments:''}}</view>
							<textarea v-else-if="InsureBizIsAText" :focus="InsureBizIsFocus" :value="InsureBizComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,true)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
						</view>
                        
						<view v-show="insures2.insure_biz.isCheck && insures2.insure_biz.isShow">
							<block v-for="(item,index1) in insures2.insure_biz.insureItems" :key="index1">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group @tap="pickerChangeTB2(insures2,'biz_item_check',index1,item.isCheck)" >
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="true" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" @tap="pickerChangeTB2(insures2,'biz_pay',index1,item.isFreePay)" >不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index1' data-type="traffic" :value="item.value" disabled="true" @tap="pickerChangeTB2(insures2,'biz_input',index1,'')" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index1' data-type="biz" :value="item.value" :range="item.pickers" @change="(event)=>pickerChangeTB2(insures2,'biz_picker','',event)" >
											<view class="uni-input">{{item.pickers[item.value]}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
					</view>
					<!-- 自定义险种 选择栏 -->
					<view class="zc-tab-bar" v-show="3 === tabBar.tabIndex">
						<view class="zcJustifyC_between zcAlignI_center zcBizStyle">
							<checkbox-group :id='1' @change="zcTBcheckBox3">
								<label class="checkbox">
									<checkbox :checked="insures3.insure_traffic.isCheck" :disabled="false" style="transform: scale(0.5);"/>
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;">交强险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="items6[0].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="0" :cardItem="items6[0]" @zcChengeValue="zcChangeValueB3" ></zc-card>
							</view>
						</view>
                        
						<view class="zcModel-card-item uni-flex">
							<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
							<view v-if="!InsureTrafficIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(false)" >{{InsureTrafficComments?InsureTrafficComments:''}}</view>
							<textarea v-else-if="InsureTrafficIsAText" :focus="InsureTrafficIsFocus" :value="InsureTrafficComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,false)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
						</view>
                        
						<view v-show="insures3.insure_traffic.isCheck">
							<block v-for="(item,index) in insures3.insure_traffic.insureItems" :key="index">
								<view class="zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
									<checkbox-group :id='index' data-type="traffic" @change="tbCheckBox3">
										<label class="checkbox">
											<checkbox :checked="item.isCheck" :disabled="false" style="transform: scale(0.5);" />
										</label>
									</checkbox-group>
									<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
									<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" :id='index' data-type="traffic" @tap="zcFreePayshow">不计免赔</view>
									<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
									<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
										<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index' data-type="traffic" :value="item.value" @blur="pickerChangeTB4" placeholder="请录入保额" />
										<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index' data-type="traffic" :value="item.value" :range="item.pickers" @change="pickerChangeTB4">
											<view class="uni-input">{{item.value}}</view>
										</picker>
									</view>
								</view>
							</block>
						</view>
						
						<view class="zcJustifyC_between zcAlignI_center zcBizStyle" >
							<checkbox-group :id='2' @change="zcTBcheckBox3">
								<label class="checkbox">
									<checkbox :checked="insures3.insure_biz.isCheck" :disabled="false" style="transform: scale(0.5);" />
								</label>
							</checkbox-group>
							<view style="flex-shrink: 0;flex: 1;" >商业险</view>
							<view class="zcJustifyC_between zcAlignI_center" style="display: flex;flex: 1;position: relative;">
								<input type="text" placeholder-style="text-align: center;" :placeholder="items6[1].value?'':'请选择保险起期'" />
								<zc-card :zcIndex="1" :cardItem="items6[1]" @zcChengeValue="zcChangeValueB3" ></zc-card>
							</view>
						</view>
						
                        <view class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;color: #333333;flex: 1;">折扣：</view>
                            <view class="zcModel-card-item-stext uni-flex zcAlignI_center" style="width: 41%;">
                                <input type="digit" :value="InsureBizDiscount" @input="zcChangeDiscount" style="border-bottom: 1rpx solid #999999;margin-right: 26rpx;" />%
                            </view>
                        </view>
                        <view class="zcModel-card-item uni-flex">
                        	<view style="flex-shrink: 0;line-height: 1.1;color: #333333;">备注：</view>
                        	<view v-if="!InsureBizIsAText" class="zcModel-card-item-stext" :data-id="index" @tap="zcTapATextValue(true)" >{{InsureBizComments?InsureBizComments:''}}</view>
                        	<textarea v-else-if="InsureBizIsAText" :focus="InsureBizIsFocus" :value="InsureBizComments" :show-confirm-bar="false" class="zcModel-card-item-text" @blur="(e)=>doChangeText(e,true)" maxlength="-1" :data-id="index" auto-height="true"></textarea>
                        </view>
                        
						<view v-show="insures3.insure_biz.isCheck" class="moreBox" :style="{'height':moreHeight+'px'}">
                            <view id="moreBox" v-show="insures3.insure_biz.isCheck">
                            	<block v-for="(item,index) in insures3.insure_biz.insureItems" :key="index">
                            		<view class="insures3RefBiz zcJustifyC_between zcAlignI_center" style="display: flex;padding: 20upx 0;margin: 0 20upx;border-top: 1px solid #F5F5F5;">
                            			<checkbox-group :id='index' data-type="biz" @change="tbCheckBox3">
                            				<label class="checkbox">
                            					<checkbox :checked="item.isCheck" :disabled="false" style="transform: scale(0.5);" />
                            				</label>
                            			</checkbox-group>
                            			<view style="flex-shrink: 0;flex: 1;" >{{item.title}}</view>
                            			<view class="zcLabel" v-show="item.isShowFreePay" :class="item.isFreePay?'zcLabelActive':''" :id='index' data-type="biz" @tap="zcFreePayshow" >不计免赔</view>
                            			<view v-show="!item.isInsureAmountShow || !item.isInsureAmount" class="uni-flex uni-flex-item" style="width: 172upx;flex: 0 1 auto;" ></view>
                            			<view v-if="item.isInsureAmount" v-show="item.isInsureAmountShow" style="width: 172upx;flex: 0 1 auto;" class="zcPicker-model-item" :class="item.InputMethod === '保费和保额选择'?'iconfont icon-sanjiaojiantoutriangular-copy-after':''">
                            				<input v-if="item.InputMethod === '保费和保额手工录入'" style="padding: 0 20upx;text-align: right;padding-right: 40upx;" type="text" :id='index' data-type="biz" :value="item.value" @blur="pickerChangeTB4" placeholder="请录入保额" />
                            				<picker v-else-if="item.InputMethod === '保费和保额选择'" mode="selector" :id='index' data-type="biz" :value="item.value" :range="item.pickers" @change="pickerChangeTB4">
                            					<view class="uni-input">{{item.value}}</view>
                            				</picker>
                            			</view>
                            		</view>
                            	</block>
                            </view>
                            <view id="moreButton" style="background-color: #FFFFFF;position: absolute;bottom: 0;left: 0;width: 100%;z-index: 20;">
                            	<view @tap="doCustomerInfoMore" class="uni-flex zcJustifyC_center zcAlignI_center">
                            		{{CustomerInfoMoreText}}
                            		<view class="iconfont icon-Order-Details-SeeMore" :style="{'transform':isCustomerInfoMore?'rotate(180deg)':''}"></view>
                            	</view>
                            </view>
                        </view>
						
					</view>
				<!-- </swiper> -->
			</view>
		</view>
		
		<view class="zcFooter-but uni-flex">
			<button @tap="zcNextStep">下一步</button>
		</view>
		
		
	</view>
</template>

<script>
	import zcCard from "../../components/zc-card/zc-card.vue"
	import tabBar from "../../components/tab-bar/tab-bar.vue"
	
	let _this;
	export default {
		components:{
			zcCard,
			tabBar
		},
		data() {
			return {
				SN:'',
				VehicleIsNewCar:true,
				VehicleInfoSN:'',
				VehiclePlateNo:'',
				VehicleOwnerCity:'',	//城市
				isInsuredShow:true,		//投保人
				isInsuredShow1:true,	//被保人
				OrderLabel:[],	//	订单标签
				OrderLabelInfo:[],	//	订单标签（未处理数据）
                CustomerInfoMoreText:'更多',
                isCustomerInfoMore:false,
                moreHeight:0,   // 可视区域高度
                shortMoreHeight:0,   // 最小可视区域高度
                longMoreHeight:0,   // 最大可视区域高度
                moreButHeight:0,    // 更多按钮高度
                scrollTop:0,    // 当前滚动条位置
                scrollNum:0,    // 低级更多后记录的位置
				items1:[
					{
						title:'车牌号',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'车架号',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'发动机号',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'初登日期',
						value:'',
						isTitleColon:true,
						isDisabled:false,
						type:"picker",
						mode:'date',
						width:30,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					}
				],
				picker1:{
					index:-1,
					lists:['非营运','营运']
				},
				picker2:{
					index:-1,
					lists:['私家车','网约车'],
				},
				picker3:{
					index:-1,
					lists:this.$ZcPublic.Constant.CAR_TYPE,
				},
                picker4: {
                    index:-1,
                    lists: this.$ZcPublic.Constant.PAY_TYPE
                },
                picker5: {
                    index:0,
                    lists: this.$ZcPublic.Constant.RENEW_TYPE
                },
                picker6: {
                    index:0,
                    lists: this.$ZcPublic.Constant.TRUCK_TYPE
                },
                picker7: {
                    index:-1,
                    isShow:false,
                    lists: this.$ZcPublic.Constant.NEW_FORM
                },
                picker8: {
                    index:-1,
                    isShow:false,
                    lists: this.$ZcPublic.Constant.INTERNET_CAR_TYPE
                },
                optionBoxsItem1:{
                    value:'无',
                    optionBoxs:[
                        {
                            text:"无",	//显示值
                            value:"无",	//隐藏值
                        },
                        {
                            text:"本店续保",	//显示值
                            value:"本店续保",	//隐藏值
                        },
                        {
                            text:"本店新增",	//显示值
                            value:"本店新增",	//隐藏值
                        },
                    ]
                },
                optionBoxsItem2:{
                    value:'',
                    optionBoxs:[
                        {
                            text:"非网约车",	//显示值
                            value:"非网约车",	//隐藏值
                        },
                        {
                            text:"网约车",	//显示值
                            value:"网约车",	//隐藏值
                        },
                    ]
                },
				items2:[
                    {
                    	title:'新/旧/过户车',
                    	value:'',
                    	isTitleColon:true,
                    	type:"radio",
                    	width:30,
                    	optionBoxs:[	//选项框 样式
                    		{
                    			text:"新车",	//显示值
                    			value:"新车",	//隐藏值
                    			boxSize:0.5,	// 范围：0.5~1
                    			isBoxCheck:false,	//是否选中
                    			isBoxDisabled:false,		//是否禁止
                    			boxColor:"#3CA4FA"	//选中后样式颜色
                    		},
                    		{
                    			text:"旧车",	//显示值
                    			value:"旧车",	//隐藏值
                    			boxSize:0.5,	// 范围：0.5~1
                    			isBoxCheck:false,	//是否选中
                    			isBoxDisabled:false,		//是否禁止
                    			boxColor:"#3CA4FA"	//选中后样式颜色
                    		},
                    		{
                    			text:"过户车",	//显示值
                    			value:"过户车",	//隐藏值
                    			boxSize:0.5,	// 范围：0.5~1
                    			isBoxCheck:false,	//是否选中
                    			isBoxDisabled:false,		//是否禁止
                    			boxColor:"#3CA4FA"	//选中后样式颜色
                    		}
                    	],
                    	rStyle:{type:""}
                    },
					{
						title:'过户日期',
						value:'',
						isShow:false,
						isTitleColon:true,
						type:"picker",
						mode:'date',
						width:30,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					},
					{
						title:'车主类别',
						value:'',
						isTitleColon:true,
						type:"radio",
						width:30,
						optionBoxs:[	//选项框 样式
							{
								text:"个人",	//显示值
								value:"个人",	//隐藏值
								boxSize:0.5,	// 范围：0.5~1
								isBoxCheck:false,	//是否选中
								isBoxDisabled:false,		//是否禁止
								boxColor:"#3CA4FA"	//选中后样式颜色
							},
							{
								text:"企业",	//显示值
								value:"企业",	//隐藏值
								boxSize:0.5,	// 范围：0.5~1
								isBoxCheck:false,	//是否选中
								isBoxDisabled:false,		//是否禁止
								boxColor:"#3CA4FA"	//选中后样式颜色
							},
							{
								text:"机关团体",	//显示值
								value:"机关团体",	//隐藏值
								boxSize:0.5,	// 范围：0.5~1
								isBoxCheck:false,	//是否选中
								isBoxDisabled:false,		//是否禁止
								boxColor:"#3CA4FA"	//选中后样式颜色
							}
						],
						rStyle:{type:""}
					},
					{
						title:'车主姓名',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'联系电话',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							maxlength:11,
							type:"number",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'其他联系方式',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
                    {
                    	title:'详细地址',
                    	value:'',
                    	isTitleColon:true,
                    	type:"input",
                    	width:30,
                    	inputStyle:{	//input输入框样式
                            placeholderText:"必填",		//默认显示内容
                    		type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
                    	},
                    	rStyle:{type:""}
                    }
				],
				items3:[
					{
						title:'证件号',
						value:'',
                        number:0,
                        isChangeValue:true,
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					}
				],
				items4:[
					{
						title:'姓名',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"投保人姓名(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'联系电话',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"投保人电话(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'证件类型',
						value:'0',
						isTitleColon:true,
						type:"picker",
						mode:'selector',
                        isPlaceholder:true,
						width:30,
						picker:this.$ZcPublic.Constant.CAR_TYPE,
						rStyle:{type:""}
					},
					{
						title:'证件号',
						value:'',
                        number:0,
                        isChangeValue:true,
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"投保人证件号(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					}
				],
				zcItems4:[	//被投保人信息
					{
						title:'姓名',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"被保人姓名(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'联系电话',
						value:'',
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"被保人联系电话(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					},
					{
						title:'证件类型',
						value:'0',
						isTitleColon:true,
						type:"picker",
						mode:'selector',
                        isPlaceholder:true,
						width:30,
						picker:this.$ZcPublic.Constant.CAR_TYPE,
						rStyle:{type:""}
					},
					{
						title:'证件号',
						value:'',
                        number:0,
                        isChangeValue:true,
						isTitleColon:true,
						type:"input",
						width:30,
						inputStyle:{	//input输入框样式
							placeholderText:"被保人证件号(必填)",		//默认显示内容
							type:"text",	//input输入框拉起键盘类型：text（拼音键盘） , number（数字键盘） , idcard（身份证雅正键盘）
						},
						rStyle:{type:""}
					}
				],
				tabBar:{
					tabIndex:0,
					tabBars:[
						{
							name: '单交强',
							id: 'danjiaoqiang'
						}, {
							name: '经济型',
							id: 'jingjixing'
						},{
							name: '无忧型',
							id: 'wuyouxing'
						},{
							name: '自定义',
							id: 'zidingyi'
						}
					]
				},
				TCitems:[
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					},
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					}
				],
				TCitems1:[
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					},
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					}
				],
				TCitems2:[
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					},
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					}
				],
				items6:[
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					},
					{
						title:'',
						value:'',
						isTitleColon:false,
						type:"picker",
						mode:'date',
						width:0,
						rStyle:{type:"icon",iconName:'calendar',fontSize:28}
					}
				],
				insures:{
					id:0,
					insure_traffic:{	//交强险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
					
						]
					},
					insure_biz:{	//商业险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					}
				},
				insures1:{
					id:1,
					insure_traffic:{	//交强险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					},
					insure_biz:{	//商业险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					}
				},
				insures2:{
					id:2,
					insure_traffic:{	//交强险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					},
					insure_biz:{	//商业险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					}
				},
				insures3:{
					insure_traffic:{	//交强险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					},
					insure_biz:{	//商业险
						isCheck:false,	//是否选中 险种类型
						isShow:false,	// 是否显示当前险种类型
						insureItems:[	//险种列表
							
						]
					}
				},
				saveInsures:[],
				saveInsures1:[],
				saveInsures2:[],
				saveInsures3:{
					InsureTrafficItems:[],
					InsureBizItems:[]
				},
                InsureTrafficIsAText:false, // 交强险 备注是否输入
                InsureTrafficIsFocus:false, // 交强险 备注是否输入
                InsureBizIsAText:false, // 商业险 备注是否输入
                InsureBizIsFocus:false, // 交强险 备注是否输入
                InsureTrafficComments:'', // 交强险 备注内容
                InsureBizComments:'',   // 商业险 备注内容
                InsureBizDiscount: ''   //商业险折扣
			}
		},
		onLoad(e) {
			_this = this;
			uni.showLoading({
				title: '加载中',
				mask: true
			});
			
			_this.zcInsureOrderCreateNewSN();	//获取 保单 保存SN
			if (e.VehiclePlateNo) {
				let VehiclePlateNo = e.VehiclePlateNo;
				_this.VehiclePlateNo = VehiclePlateNo;
				_this.zcQueryVehicleInfoByPlateNo(VehiclePlateNo);	//通过 车牌号查询 客户信息
			}
			if (e.VehicleInfoSN) {
				let VehicleInfoSN = e.VehicleInfoSN;
				_this.VehicleInfoSN = VehicleInfoSN;
				_this.zcGetVehicleInfo(VehicleInfoSN);	//通过 车辆SN 客户信息
			}
		},
        onPageScroll(res) {
        	_this.scrollTop = res.scrollTop;
        },
		methods: {
			// ------------  下拉选择函数区 ----------------
			pickerChange1(id,res) {
                if (id == 1) {
                    _this.picker1.index = parseInt(res.target.value);
                }else if (id ==4) {
                    _this.picker4.index = parseInt(res.target.value);
                }else if (id == 5) {
                    _this.picker5.index = parseInt(res.target.value);
                }else if (id == 6) {
                    _this.picker6.index = parseInt(res.target.value);
                }else if (id == 7) {
                    _this.picker7.index = parseInt(res.target.value);
                }else if (id == 8) {
                    _this.picker8.index = parseInt(res.target.value);
                }
				
			},
			pickerChange2(res) {
				_this.picker2.index = parseInt(res.target.value);
			},
			pickerChange3(res) {
				_this.picker3.index = parseInt(res.target.value);
			},
            // 单选框联动picker下拉选择 事件
            zcChengeRadio(id,res) {
                if (id == 1) {
                    _this.picker7.isShow = false;
                    _this.optionBoxsItem1.value = res.detail.value;
                    if (res.detail.value === '本店新增' && _this.items2[0].value == '旧车') {
                        _this.picker7.isShow = true;
                    }
                }else if (id == 2) {
                    _this.picker8.isShow = false;
                    _this.optionBoxsItem2.value = res.detail.value;
                    if (res.detail.value === '网约车') {
                        _this.picker8.isShow = true;
                    }
                }
            },
			//	套餐 保额 选择
			pickerChangeTB2(res,type,id,event) {
				console.log('套餐 保额 选择：',res);
				if (res.id === 0) {
					_this.items6[0].value = _this.TCitems[0].value;
					_this.items6[1].value = _this.TCitems[1].value;
				}else if (res.id === 1) {
					_this.items6[0].value = _this.TCitems1[0].value;
					_this.items6[1].value = _this.TCitems1[1].value;
				}else if (res.id === 2) {
					_this.items6[0].value = _this.TCitems2[0].value;
					_this.items6[1].value = _this.TCitems2[1].value;
				}
				
				_this.insures3.insure_traffic.isShow = false;
				_this.insures3.insure_traffic.isCheck = false;
				_this.insures3.insure_biz.isShow = false;
				_this.insures3.insure_biz.isCheck = false;
				for (let i = 0; i < _this.insures3.insure_traffic.insureItems.length; i++) {
					_this.insures3.insure_traffic.insureItems[i].isCheck = false;
				}
				for (let i = 0; i < _this.insures3.insure_biz.insureItems.length; i++) {
					_this.insures3.insure_biz.insureItems[i].isCheck = false;
				}
				
				_this.tabBar.tabIndex = 3;
				if (res.insure_traffic.insureItems.length > 0) {
					if (res.insure_traffic.isShow) {
						_this.insures3.insure_traffic.isShow = res.insure_traffic.isShow;
						_this.insures3.insure_traffic.isCheck = res.insure_traffic.isCheck;
						for (let i = 0; i < res.insure_traffic.insureItems.length; i++) {
							for (let k = 0; k < _this.insures3.insure_traffic.insureItems.length; k++) {
								if (_this.insures3.insure_traffic.insureItems[k].title === res.insure_traffic.insureItems[i].title) {
									if (type !== 'traffic_item_check') {
										_this.insures3.insure_traffic.insureItems[k].isCheck = res.insure_traffic.insureItems[i].isCheck;
									}else {
										if (id !== i) {
											_this.insures3.insure_traffic.insureItems[k].isCheck = res.insure_traffic.insureItems[i].isCheck;
										}
									}
									if (type !== 'traffic_pay') {
										_this.insures3.insure_traffic.insureItems[k].isFreePay = res.insure_traffic.insureItems[i].isFreePay;
									}else {
										if (id !== i) {
											_this.insures3.insure_traffic.insureItems[k].isFreePay = res.insure_traffic.insureItems[i].isFreePay;
										}
									}
									_this.insures3.insure_traffic.insureItems[k].isInsureAmount = res.insure_traffic.insureItems[i].isInsureAmount;
									if (id !== i) {
										_this.insures3.insure_traffic.insureItems[k].isInsureAmountShow = res.insure_traffic.insureItems[i].isInsureAmountShow;
									}
									_this.insures3.insure_traffic.insureItems[k].isShowFreePay = res.insure_traffic.insureItems[i].isShowFreePay;
									if (res.insure_traffic.insureItems[i].InputMethod === '保费和保额选择') {
										if (type !== 'traffic_picker') {
											_this.insures3.insure_traffic.insureItems[k].value = res.insure_traffic.insureItems[i].pickers[res.insure_traffic.insureItems[i].value];
										}else {
											if (parseInt(event.target.id) !== i) {
												_this.insures3.insure_traffic.insureItems[k].value = res.insure_traffic.insureItems[i].pickers[res.insure_traffic.insureItems[i].value];
											}
										}
										
									}else {
										_this.insures3.insure_traffic.insureItems[k].value = res.insure_traffic.insureItems[i].value;
									}
									
								}
							}
						}
					}else {
						
						_this.insures3.insure_traffic.isShow = true;
						_this.insures3.insure_traffic.isCheck = false;
						for (let k = 0; k < _this.insures3.insure_traffic.insureItems.length; k++) {
							_this.insures3.insure_traffic.insureItems[k].isCheck = false;
							_this.insures3.insure_traffic.insureItems[k].isFreePay = false;
							_this.insures3.insure_traffic.insureItems[k].isInsureAmount = false;
							_this.insures3.insure_traffic.insureItems[k].isInsureAmountShow = false;
							_this.insures3.insure_traffic.insureItems[k].isShowFreePay = false;
							_this.insures3.insure_traffic.insureItems[k].value = '';
						}
					}
				}
				
				if (res.insure_biz.insureItems.length > 0) {
					if (res.insure_biz.isShow) {
						_this.insures3.insure_biz.isShow = res.insure_biz.isShow;
						_this.insures3.insure_biz.isCheck = res.insure_biz.isCheck;
						for (let i = 0; i < res.insure_biz.insureItems.length; i++) {
							for (let k = 0; k < _this.insures3.insure_biz.insureItems.length; k++) {
								if (_this.insures3.insure_biz.insureItems[k].title === res.insure_biz.insureItems[i].title) {
									
									if (type !== 'biz_item_check') {
										_this.insures3.insure_biz.insureItems[k].isCheck = res.insure_biz.insureItems[i].isCheck;
									}else {
										if (id !== i) {
											_this.insures3.insure_biz.insureItems[k].isCheck = res.insure_biz.insureItems[i].isCheck;
										}
									}
									if (type !== 'biz_pay') {
										_this.insures3.insure_biz.insureItems[k].isFreePay = res.insure_biz.insureItems[i].isFreePay;
									}else {
										if (id !== i) {
											_this.insures3.insure_biz.insureItems[k].isFreePay = res.insure_biz.insureItems[i].isFreePay;
										}
									}
									_this.insures3.insure_biz.insureItems[k].isInsureAmount = res.insure_biz.insureItems[i].isInsureAmount;
									if (id !== i) {
										_this.insures3.insure_biz.insureItems[k].isInsureAmountShow = res.insure_biz.insureItems[i].isInsureAmountShow;
									}
									_this.insures3.insure_biz.insureItems[k].isShowFreePay = res.insure_biz.insureItems[i].isShowFreePay;
									if (res.insure_biz.insureItems[i].InputMethod === '保费和保额选择') {
										if (type !== 'biz_picker') {
											_this.insures3.insure_biz.insureItems[k].value = res.insure_biz.insureItems[i].pickers[res.insure_biz.insureItems[i].value];
										}else {
											if (parseInt(event.target.id) !== i) {
												_this.insures3.insure_biz.insureItems[k].value = res.insure_biz.insureItems[i].pickers[res.insure_biz.insureItems[i].value];
											}
										}
									}else {
										_this.insures3.insure_biz.insureItems[k].value = res.insure_biz.insureItems[i].value;
									}
								}
							}
						}
					}else {
						_this.insures3.insure_biz.isShow = true;
						_this.insures3.insure_biz.isCheck = false;
						for (let k = 0; k < _this.insures3.insure_biz.insureItems.length; k++) {
							_this.insures3.insure_biz.insureItems[k].isCheck = false;
							_this.insures3.insure_biz.insureItems[k].isFreePay = false;
							_this.insures3.insure_biz.insureItems[k].isInsureAmount = false;
							_this.insures3.insure_biz.insureItems[k].isInsureAmountShow = false;
							_this.insures3.insure_biz.insureItems[k].isShowFreePay = false;
							_this.insures3.insure_biz.insureItems[k].value = '';
						}
					}
				}
				
				// biz_item_check 、biz_check 、biz_pay 、biz_input 、 biz_picker
				// traffic_check 、traffic_item_check 、traffic_pay 、traffic_input 、 traffic_picker
				if (type === 'traffic_check') {
					_this.insures3.insure_traffic.isCheck = !res.insure_traffic.isCheck;
					_this.insures3.insure_traffic.isShow = !res.insure_traffic.isShow;
					
				}else if (type === 'traffic_item_check') {
					for (let k = 0; k < _this.insures3.insure_traffic.insureItems.length; k++) {
						if (_this.insures3.insure_traffic.insureItems[k].title === res.insure_traffic.insureItems[id].title) {
							_this.insures3.insure_traffic.insureItems[k].isCheck = !res.insure_traffic.insureItems[id].isCheck;
						}
					}
				}else if (type === 'traffic_pay') {
					for (let k = 0; k < _this.insures3.insure_traffic.insureItems.length; k++) {
						if (_this.insures3.insure_traffic.insureItems[k].title === res.insure_traffic.insureItems[id].title) {
							_this.insures3.insure_traffic.insureItems[k].isFreePay = !res.insure_traffic.insureItems[id].isFreePay;
						}
					}
				}else if (type === 'traffic_input') {
					
				}else if (type === 'traffic_picker') {
					for (let k = 0; k < _this.insures3.insure_traffic.insureItems.length; k++) {
						if (_this.insures3.insure_traffic.insureItems[k].title === res.insure_traffic.insureItems[parseInt(event.target.id)].title) {
							_this.insures3.insure_traffic.insureItems[k].value = res.insure_traffic.insureItems[parseInt(event.target.id)].pickers[event.detail.value];
						}
					}
				}else if (type === 'biz_check') {
					_this.insures3.insure_biz.isCheck = !res.insure_biz.isShow;
					_this.insures3.insure_biz.isShow = !res.insure_biz.isShow;
				}else if (type === 'biz_item_check') {
					for (let k = 0; k < _this.insures3.insure_biz.insureItems.length; k++) {
						if (_this.insures3.insure_biz.insureItems[k].title === res.insure_biz.insureItems[id].title) {
							_this.insures3.insure_biz.insureItems[k].isCheck = !res.insure_biz.insureItems[id].isCheck;
						}
					}
				}else if (type === 'biz_pay') {
					for (let k = 0; k < _this.insures3.insure_biz.insureItems.length; k++) {
						if (_this.insures3.insure_biz.insureItems[k].title === res.insure_biz.insureItems[id].title) {
							_this.insures3.insure_biz.insureItems[k].isFreePay = !res.insure_biz.insureItems[id].isFreePay;
						}
					}
				}else if (type === 'biz_input') {
					
				}else if (type === 'biz_picker') {
					for (let k = 0; k < _this.insures3.insure_biz.insureItems.length; k++) {
						if (_this.insures3.insure_biz.insureItems[k].title === res.insure_biz.insureItems[parseInt(event.target.id)].title) {
							_this.insures3.insure_biz.insureItems[k].value = res.insure_biz.insureItems[parseInt(event.target.id)].pickers[event.detail.value];
						}
					}
				}
			},
			pickerChangeTB4(res) {	// 自定义 保额选择
				console.log('保额 = ',res);
				// _this.picker4.index = parseInt(res.target.value);
				if (res.target.dataset.type === 'traffic') {	//较强险保额
					if (_this.insures3.insure_traffic.insureItems[res.target.id].InputMethod === '保费和保额手工录入') {
						_this.insures3.insure_traffic.insureItems[res.target.id].value = res.detail.value;
					}else if (_this.insures3.insure_traffic.insureItems[res.target.id].InputMethod === '保费和保额选择') {
						_this.insures3.insure_traffic.insureItems[res.target.id].value = _this.insures3.insure_traffic.insureItems[res.target.id].pickers[res.detail.value];
					}
				}
				if (res.target.dataset.type === 'biz') {	//商业险保额
					if (_this.insures3.insure_biz.insureItems[res.target.id].InputMethod === '保费和保额手工录入') {
						_this.insures3.insure_biz.insureItems[res.target.id].value = res.detail.value;
					}else if (_this.insures3.insure_biz.insureItems[res.target.id].InputMethod === '保费和保额选择') {
						_this.insures3.insure_biz.insureItems[res.target.id].value = _this.insures3.insure_biz.insureItems[res.target.id].pickers[res.detail.value];
					}
				}
			},
            // 备注 操作
			zcTapATextValue(res) {
                if (res) {
                    _this.InsureBizIsAText = true;
                    setTimeout(()=>{
                    	_this.InsureBizIsFocus = true;
                    },300)
                }else {
                    _this.InsureTrafficIsAText = true;
                    setTimeout(()=>{
                    	_this.InsureTrafficIsFocus = true;
                    },300)
                }
			},
            //  商业险 折扣操作
            zcChangeDiscount(res) {
                _this.InsureBizDiscount = res.target.value;
            },
            doChangeText(e,res) {
            	if (res) {
            	    _this.InsureBizComments = e.target.value;
            	    _this.InsureBizIsAText = false;
            	    _this.InsureBizIsFocus = false;
            	}else {
                    _this.InsureTrafficComments = e.target.value;
                    _this.InsureTrafficIsAText = false;
                    _this.InsureTrafficIsFocus = false;
                }
            },
            // 险种更多操作
            doCustomerInfoMore() {
				if (_this.CustomerInfoMoreText === '更多') {
					_this.scrollNum = _this.scrollTop;
                    _this.moreHeight = _this.longMoreHeight+_this.moreButHeight;
					_this.CustomerInfoMoreText = '收起';
				}else {
					_this.CustomerInfoMoreText = '更多';
                    _this.moreHeight = _this.shortMoreHeight+_this.moreButHeight;
					uni.pageScrollTo({
						scrollTop:_this.scrollNum
					})
				}
				_this.isCustomerInfoMore = !_this.isCustomerInfoMore;
            },
            doInitMore() {
                _this.$nextTick(function(){
                    let query = wx.createSelectorQuery();
                    query.select('#moreBox').boundingClientRect(rect=>{
                        if (rect) {
                           _this.longMoreHeight= rect.height; 
                        }
                    }).exec();
                    query.select('.insures3RefBiz').boundingClientRect(rect=>{
                        if (rect) {
                           _this.shortMoreHeight = rect.height*8; 
                        }
                    }).exec();
                    query.select('#moreButton').boundingClientRect(rect=>{
                        if (rect) {
                           _this.moreButHeight= rect.height;
                           _this.moreHeight= rect.height + _this.shortMoreHeight; 
                        }
                    }).exec();
                })    
            },
            
			// --------------  下拉选择函数区 -- END ---------------
            // 初登日期判断 是否新车
            isRegistryOldOrNew(res) {
                let nowDate = new Date().toJSON().split('T')[0].split('-');
                let RegistryDate = new Date(res).toJSON().split('T')[0].split('-');
                let newMonth = (nowDate[0]-RegistryDate[0])*12+(nowDate[1]-RegistryDate[1]);
                let newDay = nowDate[2]-RegistryDate[2];
                let bl = false;
                if (newMonth <3 && newMonth > 0) {
                    bl = true;
                }else if (newMonth  == 3 && newDay <= 0) {
                     bl = true;
                }else if (newMonth  == 0 && newDay >= 0) {
                    bl = true;
                }
                return bl;
            },
            countYearAndDay(date) {
                if (!date) {
                   return '';
                }
                let sDate = new Date(date);
                let sYear = sDate.getFullYear()+1;
                let sMonth = sDate.getMonth();
                let sDay = sDate.getDate();
                
                let nDate = new Date(sYear,sMonth,sDay);
                console.log('到这里 -- ',nDate.toJSON());
                return nDate.toJSON().split('T')[0];
            },
            
			// ------------  表单函数区 ----------------
			zcChangeValue1(res) {
                if (res.id == 3) {
                    if (_this.isRegistryOldOrNew(res.value)) {
                        _this.items2[0].value = '新车';
                    }else {
                        _this.items2[0].value = '旧车';
                    }
                }
				_this.items1[res.id].value = res.value;
			},
			zcChangeValue2(res) {
				if (res.value === '新车') {
					_this.items2[0].optionBoxs[0].isBoxCheck = true;
					_this.items2[0].optionBoxs[1].isBoxCheck = false;
					_this.items2[0].optionBoxs[2].isBoxCheck = false;
					_this.items2[1].isShow = false;
                    _this.picker7.isShow = false;
				}else if (res.value === '旧车') {
					_this.items2[0].optionBoxs[0].isBoxCheck = false;
					_this.items2[0].optionBoxs[1].isBoxCheck = true;
					_this.items2[0].optionBoxs[2].isBoxCheck = false;
					_this.items2[1].isShow = false;
                    if (_this.optionBoxsItem1.value == '本店新增') {
                        _this.picker7.isShow = true;   
                    }
				}else if (res.value === '过户车') {
					_this.items2[0].optionBoxs[0].isBoxCheck = false;
					_this.items2[0].optionBoxs[1].isBoxCheck = false;
					_this.items2[0].optionBoxs[2].isBoxCheck = true;
					_this.items2[1].isShow = true;
                    _this.picker7.isShow = false;
				}
				if (res.value === '个人') {
					_this.items2[2].optionBoxs[0].isBoxCheck = true;
					_this.items2[2].optionBoxs[1].isBoxCheck = false;
					_this.items2[2].optionBoxs[2].isBoxCheck = false;
				}else if (res.value === '企业') {
					_this.items2[2].optionBoxs[0].isBoxCheck = false;
					_this.items2[2].optionBoxs[1].isBoxCheck = true;
					_this.items2[2].optionBoxs[2].isBoxCheck = false;
				}else if (res.value === '机关团体') {
					_this.items2[2].optionBoxs[0].isBoxCheck = false;
					_this.items2[2].optionBoxs[1].isBoxCheck = false;
					_this.items2[2].optionBoxs[2].isBoxCheck = true;
				}
				_this.items2[res.id].value = res.value;
			},
			zcChangeValue3(res) {
                if (res.id == 0) {
                    _this.items3[res.id].number = res.number;
                    if (_this.picker3.lists[_this.picker3.index] == '身份证' || _this.picker3.lists[_this.picker3.index] == '统一信用代码') {
                        if (res.value.length != 18) {
                             uni.showModal({
                                 title: '温馨提示',
                                 content: '尊敬的用户，您输入的证件号位数有误，请重新输入！',
                                 showCancel: false
                             });
                             return
                        } 
                    }
                }
				_this.items3[res.id].value = res.value;
			},
			zcChangeValue4(res) {
                if (res.id == 3) {
                    _this.items4[res.id].number = res.number;
                    if (_this.items4[2].picker[_this.items4[2].value] == '身份证' || _this.items4[2].picker[_this.items4[2].value] == '统一信用代码') {
                        if (res.value.length != 18) {
                             uni.showModal({
                                 title: '温馨提示',
                                 content: '尊敬的用户，您输入的证件号位数有误，请重新输入！',
                                 showCancel: false
                             });
                             return
                        } 
                    }
                }
				_this.items4[res.id].value = res.value;
			},
			zcOldChangeValue4(res) {
                if (res.id == 3) {
                    _this.zcItems4[res.id].number = res.number;
                    if (_this.zcItems4[2].picker[_this.zcItems4[2].value] == '身份证' || _this.zcItems4[2].picker[_this.zcItems4[2].value] == '统一信用代码') {
                        if (res.value.length != 18) {
                             uni.showModal({
                                 title: '温馨提示',
                                 content: '尊敬的用户，您输入的证件号位数有误，请重新输入！',
                                 showCancel: false
                             });
                             return
                        } 
                    }
                }
				_this.zcItems4[res.id].value = res.value;
			},
			zcChangeValue5(res) {
				_this.items5[res.id].value = res.value;
			},
			//标签 选中 操作
			doChenkItem(e) {	
				// console.log('当前选择：',_this.items3Infos[0]);
				let id  = parseInt(e.target.id);
				let popupId = parseInt(e.target.dataset.popupid);
				
				if (_this.OrderLabel[popupId].isDisabled) {
					return;
				}
				
				// 多选
				//Array.indexOf(index);  表示Array数组中是否包含 index 值，包含则返回该值在数组中的下标，否则返回 -1
				if (_this.OrderLabel[popupId].type === 'checkbox') {
					if (_this.OrderLabel[popupId].actives.indexOf(id) !== (-1)) {
						for (let i = 0; i < _this.OrderLabel[popupId].actives.length; i++) {
							if (_this.OrderLabel[popupId].actives[i] === id) {
								//  当前选中的标签已经被选中了，所以进行删除选中标签相关
								_this.OrderLabel[popupId].actives.splice(i,1);
								let new_aValue = _this.OrderLabel[popupId].aValue.split(' , ');
								new_aValue.splice(i,1);
								_this.OrderLabel[popupId].aValue = '';
								for (let a = 0; a < new_aValue.length; a++) {
									if (a === 0) {
										_this.OrderLabel[popupId].aValue = new_aValue[a];
									}else {
										_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].aValue +' , '+ new_aValue[a];
									}
								}
								
								if (_this.OrderLabel[popupId].list[id].oS) {
									for (let k = 0; k < _this.OrderLabel.length; k++) {
										if (_this.OrderLabel[k].value === _this.OrderLabel[popupId].list[id].Code) {
											_this.OrderLabel.splice(k,1);	// 删除
										}
									}
								}
							}
						}
					}else {
						//  当前选中的标签 未选中，所以进行添加选中标签相关
						_this.OrderLabel[popupId].actives.push(id);
						if (_this.OrderLabel[popupId].aValue) {
							_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].aValue+' , '+_this.OrderLabel[popupId].list[id].Name;
						}else {
							_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].list[id].Name;
						}
						
						if (_this.OrderLabel[popupId].list[id].oS) {
							let item = {
								title:_this.OrderLabel[popupId].list[id].oS[0].Name,
								Code:_this.OrderLabel[popupId].list[id].oS[0].Code,
								isShow:true,
								value:_this.OrderLabel[popupId].list[id].Code,
								row:48,
								isDisabled:false,
								type:'audio',
								info:_this.OrderLabel[popupId].list[id].oS[0],
								actives:[],
								aValue:'',
								list:_this.OrderLabel[popupId].list[id].oS[0].childs
							}
							if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '单选') {
								item.type = 'audio';
							}else if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '多选') {
								item.type = 'checkbox';
							}
							if (_this.OrderLabel[popupId].list[id].oS[0].OnlyWrite) {
								item.isDisabled = true;
							}
							// _this.items3Infos[0].childs.splice((popupId+1),0,_this.items3Infos[0].childs[popupId].childs[id].oS[0]);
							_this.OrderLabel.splice((popupId+1),0,item);
						}
					}
				}
				
				//  单选
				if (_this.OrderLabel[popupId].type === 'audio') {
					if (_this.OrderLabel[popupId].actives.length === 0) {
						_this.OrderLabel[popupId].actives.push(id);
						_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].list[id].Name;
						
						if (_this.OrderLabel[popupId].list[id].oS) {
							let item = {
								title:_this.OrderLabel[popupId].list[id].oS[0].Name,
								Code:_this.OrderLabel[popupId].list[id].oS[0].Code,
								isShow:true,
								value:_this.OrderLabel[popupId].list[id].Code,
								row:48,
								isDisabled:false,
								type:'audio',
								info:_this.OrderLabel[popupId].list[id].oS[0],
								actives:[],
								aValue:'',
								list:_this.OrderLabel[popupId].list[id].oS[0].childs
							}
							if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '单选') {
								item.type = 'audio';
							}else if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '多选') {
								item.type = 'checkbox';
							}
							if (_this.OrderLabel[popupId].list[id].oS[0].OnlyWrite) {
								item.isDisabled = true;
							}
							// _this.items3Infos[0].childs.splice((popupId+1),0,_this.items3Infos[0].childs[popupId].childs[id].oS[0]);
							_this.OrderLabel.splice((popupId+1),0,item);
						}
					}else {
						//  单选选中过值的，首先处理选中的值是否添加过 子标签，添加过则删除 。 然后处理但钱选中标签是否有 子标签，有则添加
						
						if (_this.OrderLabel[popupId].list[_this.OrderLabel[popupId].actives[0]].oS && _this.OrderLabel[popupId].actives[0] !== id) {
							let array = JSON.parse(JSON.stringify(_this.OrderLabel));
							for (let k = 0; k < array.length; k++) {
								if (array[k].value === array[popupId].list[array[popupId].actives[0]].Code) {
									_this.OrderLabel.splice(k,1);	// 删除
								}
							}
							
							_this.OrderLabel[popupId].actives = [];
							_this.OrderLabel[popupId].actives.push(id);
							_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].list[id].Name;
						}else if(_this.OrderLabel[popupId].actives[0] !== id) {
							if (_this.OrderLabel[popupId].list[id].oS) {
								let item = {
									title:_this.OrderLabel[popupId].list[id].oS[0].Name,
									Code:_this.OrderLabel[popupId].list[id].oS[0].Code,
									isShow:true,
									value:_this.OrderLabel[popupId].list[id].Code,
									row:48,
									isDisabled:false,
									type:'audio',
									info:_this.OrderLabel[popupId].list[id].oS[0],
									actives:[],
									aValue:'',
									list:_this.OrderLabel[popupId].list[id].oS[0].childs
								}
								if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '单选') {
									item.type = 'audio';
								}else if (_this.OrderLabel[popupId].list[id].oS[0].sModel === '多选') {
									item.type = 'checkbox';
								}
								if (_this.OrderLabel[popupId].list[id].oS[0].OnlyWrite) {
									item.isDisabled = true;
								}
								// _this.items3Infos[0].childs.splice((popupId+1),0,_this.items3Infos[0].childs[popupId].childs[id].oS[0]);
								_this.OrderLabel.splice((popupId+1),0,item);
							}
							
							_this.OrderLabel[popupId].actives = [];
							_this.OrderLabel[popupId].actives.push(id);
							_this.OrderLabel[popupId].aValue = _this.OrderLabel[popupId].list[id].Name;
						}else {
							if (_this.OrderLabel[popupId].list[_this.OrderLabel[popupId].actives[0]].oS) {
								let array = JSON.parse(JSON.stringify(_this.OrderLabel));
								for (let k = 0; k < array.length; k++) {
									if (array[k].value === array[popupId].list[array[popupId].actives[0]].Code) {
										_this.OrderLabel.splice(k,1);	// 删除
									}
								}
							}
							_this.OrderLabel[popupId].aValue = '';
							_this.OrderLabel[popupId].actives = [];
						}
						
					}
				}
				
			},
			//标签 操作
			zcPopupShow(index,bl) {		// 显示隐藏 标签选项
				_this.OrderLabel[index].isShow = !bl;
			},
			//  --------------  表单函数区 -- END ---------------
			checkboxChange(res) {
				console.log('投保人 = ',res);
				if (res.detail.value[0] === '同车主') {
					_this.isInsuredShow = true;
                    _this.items4[0].value = _this.items2[3].value;
                    _this.items4[1].value = _this.items2[4].value;
                    _this.items4[2].value = ''+_this.picker3.index;
                    _this.items4[3].value = _this.items3[0].value;
                    _this.items4[3].number = _this.items3[0].value.length;
				}else{
					_this.isInsuredShow = false;
                    _this.items4[0].value = '';
                    _this.items4[1].value = '';
                    _this.items4[2].value = '0';
                    _this.items4[3].value = '';
                    _this.items4[3].number = 0;
				}
			},
			oldCheckboxChange(res) {
				console.log('被保人 = ',res);
				if (res.detail.value[0] === '同车主') {
					_this.isInsuredShow1 = true;
                    _this.zcItems4[0].value = _this.items2[3].value;
                    _this.zcItems4[1].value = _this.items2[4].value;
                    _this.zcItems4[2].value = ''+_this.picker3.index;
                    _this.zcItems4[3].value = _this.items3[0].value;
                    _this.zcItems4[3].number = _this.items3[0].value.length;
				}else{
					_this.isInsuredShow1 = false;
                    _this.zcItems4[0].value = '';
                    _this.zcItems4[1].value = '';
                    _this.zcItems4[2].value = '0';
                    _this.zcItems4[3].value = '';
                    _this.zcItems4[3].number = 0;
				}
			},
			tapTab(res) {
				_this.tabBar.tabIndex = parseInt(res);
				
				// 单交强、经济型、无忧型
				if (parseInt(res) === 0) {
					_this.zcQueryInsureTypeGroupList('单交强');
				}else if (parseInt(res) === 1) {
					_this.zcQueryInsureTypeGroupList('经济型');
				}else if (parseInt(res) === 2) {
					_this.zcQueryInsureTypeGroupList('无忧型');
				}
			},
			async changeTab(res) {
				let index = res.target.current;
				_this.tabBar.tabIndex = index;
			},
			//  自定义 险种类型 是否选中
			zcTBcheckBox3(e) {
				if (e.target.id === '1') {
					if (e.detail.value.length > 0) {
						_this.insures3.insure_traffic.isCheck = true;
					}else{
						_this.insures3.insure_traffic.isCheck = false;
					}
				}else {
					if (e.detail.value.length > 0) {
						_this.insures3.insure_biz.isCheck = true;
                        _this.doInitMore();
					}else{
						_this.insures3.insure_biz.isCheck = false;
					}
				}
			},
			//  自定义 险种 是否选中
			tbCheckBox3(e){	
				if (e.target.dataset.type === 'traffic') {	//交强险保额
					if (e.detail.value.length > 0) {
						_this.insures3.insure_traffic.insureItems[e.target.id].isCheck = true;
						_this.insures3.insure_traffic.insureItems[e.target.id].isInsureAmountShow = true;
						if (_this.insures3.insure_traffic.insureItems[e.target.id].isShowFreePay) {
							_this.insures3.insure_traffic.insureItems[e.target.id].isFreePay = true;
						}
					}else {
						_this.insures3.insure_traffic.insureItems[e.target.id].isCheck = false;
						_this.insures3.insure_traffic.insureItems[e.target.id].isInsureAmountShow = false;
						_this.insures3.insure_traffic.insureItems[e.target.id].isFreePay = false;
					}
				}
				if (e.target.dataset.type === 'biz') {	//商业险保额
					if (e.detail.value.length > 0) {
						_this.insures3.insure_biz.insureItems[e.target.id].isCheck = true;
						_this.insures3.insure_biz.insureItems[e.target.id].isInsureAmountShow = true;
						if (_this.insures3.insure_biz.insureItems[e.target.id].isShowFreePay) {
							_this.insures3.insure_biz.insureItems[e.target.id].isFreePay = true;
						}
					}else {
						_this.insures3.insure_biz.insureItems[e.target.id].isCheck = false;
						_this.insures3.insure_biz.insureItems[e.target.id].isInsureAmountShow = false;
						_this.insures3.insure_biz.insureItems[e.target.id].isFreePay = false;
					}
					
				}
				
			},
			// 自定义 不计免赔 是否选中
			zcFreePayshow(e) {
				if (e.target.dataset.type === 'traffic') {	//交强险
					if (_this.insures3.insure_traffic.insureItems[e.target.id].isCheck) {
						_this.insures3.insure_traffic.insureItems[e.target.id].isFreePay = !_this.insures3.insure_traffic.insureItems[e.target.id].isFreePay;
					}
				}
				if (e.target.dataset.type === 'biz') {	//商业险
					if (_this.insures3.insure_biz.insureItems[e.target.id].isCheck) {
						_this.insures3.insure_biz.insureItems[e.target.id].isFreePay = !_this.insures3.insure_biz.insureItems[e.target.id].isFreePay;
					}
				}
			},
			zcChangeValueB(e) {
				if (e.id === 0) {
					_this.TCitems[0].value = e.value;
				}else {
					_this.TCitems[1].value = e.value;
				}
			},
			zcChangeValueB1(e) {
				if (e.id === 0) {
					_this.TCitems1[0].value = e.value;
				}else {
					_this.TCitems1[1].value = e.value;
				}
			},
			zcChangeValueB2(e) {
				if (e.id === 0) {
					_this.TCitems2[0].value = e.value;
				}else {
					_this.TCitems2[1].value = e.value;
				}
			},
			zcChangeValueB3(e) {
				if (e.id === 0) {
					_this.items6[0].value = e.value;
				}else {
					_this.items6[1].value = e.value;
				}
			},
			
			//  接口调用区-------------
			zcInsureOrderCreateNewSN() {	//保单 保存SN 获取接口
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_InsureOrderCreateNewSN',
						Data: {}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									content:''+resjson.msg
								})
								return;
							}
							
							_this.SN = resjson.data;
						} else{
							
						}
					},
					Scope: this
				});
			},
			zcQueryVehicleInfoByPlateNo(VNo) {	//车牌号查询 车辆信息接口
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_QueryVehicleInfoByPlateNo',
						Data: {
							VehiclePlateNo:VNo
						}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
							if (resjson.data.Id < 1) {
								uni.hideLoading();
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:'尊敬的用户，暂无车牌号'+_this.VehiclePlateNo+'的信息，确认前往填写？',
									success(res) {
										if (res.confirm) {
											uni.navigateTo({
												url: '../customer/customer?VehiclePlateNo='+_this.VehiclePlateNo
											});
										}
									}
								})
								return;
							}
							_this.VehicleInfoSN = resjson.data.SN;	// 车辆信息SN
                            
							_this.zcQueryNonStopInsureTypeList('交强险');	// 查询 自定义 交强险、商业险 险种
							_this.zcQueryInsureTypeGroupList('单交强');	// 查询 套餐 单交强、经济型、无忧型 险种
							_this.zcQueryInsureTypeGroupList('经济型');
							_this.zcQueryInsureTypeGroupList('无忧型');
							
						} else{
							
						}
					},
					Scope: this
				});
			},
			zcGetVehicleInfo(VSN) {	//车辆SN查询 车辆信息接口
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_GetVehicleInfo',
						Data: {
							SN:VSN
						}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
							_this.VehicleInfoSN = resjson.data.SN;	// 车辆信息SN
							
							_this.zcQueryNonStopInsureTypeList('交强险');	// 查询 自定义 交强险、商业险 险种
							_this.zcQueryInsureTypeGroupList('单交强');	// 查询 套餐 单交强、经济型、无忧型 险种
							_this.zcQueryInsureTypeGroupList('经济型');
							_this.zcQueryInsureTypeGroupList('无忧型');
							
						} else{
							
						}
					},
					Scope: this
				});
			},
			zcQueryNonStopInsureTypeList(type) {	//自定义 险种
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_QueryNonStopInsureTypeList',
						Data: {
							InsureTypeCategory:type,
                            IsOnLine:true
						}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
							console.log('自定义 --- ',resjson);
                            
                            let insureItems = [];
                            if (resjson.data && resjson.data.length > 0) {
                                
                                for (let i = 0; i < resjson.data.length; i++) {
                                	let item = {
                                		isCheck:false,	//是否选中
                                		title:resjson.data[i].Name,	//险种名称
                                		isFreePay:false,	//是否 不计免赔
                                		isShowFreePay:false,	//是否显示 不计免赔
                                		value:'',	//所选 保额
                                		isInsureAmount:false,	//是否有 保额
                                		isInsureAmountShow:false,	//是否显示 保额
                                		InputMethod:resjson.data[i].InputMethod,
                                		pickers:''	//保额数据
                                	}
                                	if (resjson.data[i].FreePayCode) {
                                		item.isShowFreePay = true;
                                	}
                                	if (resjson.data[i].PurchaseType) {
                                		item.isInsureAmount = true;
                                		if (resjson.data[i].PurchaseType.indexOf(',') != -1) {
                                			item.pickers = resjson.data[i].PurchaseType.split(',');
                                		}else {
                                			item.pickers = resjson.data[i].PurchaseType.split('，');
                                		}
                                	}
                                	
                                	insureItems.push(item);
                                }	
                                
                            }
                            
                            if (type === '交强险') {
                            	if (resjson.data && resjson.data.length > 0) {
                            	    _this.saveInsures3.InsureTrafficItems = resjson.data;
                            	    _this.insures3.insure_traffic.insureItems = insureItems;
                            	    if (insureItems.length > 0) {
                            	    	_this.insures3.insure_traffic.isShow = true;
                            	    }
                            	}
                            	_this.zcQueryNonStopInsureTypeList('商业险');
                            }else if (type === '商业险') {
                            	if (resjson.data && resjson.data.length > 0) {
                            	   _this.saveInsures3.InsureBizItems = resjson.data;
                            	   _this.insures3.insure_biz.insureItems = insureItems; 
                            	}
                            	
                            	//  查询 是否有 保单信息
                            	if (_this.VehicleInfoSN) {
                            		_this.zcGetInsureOrder(_this.VehicleInfoSN);
                            	}
                            	if (insureItems.length > 0) {
                            		_this.insures3.insure_biz.isShow = true;
                            	}
                            }
                            
						} else{
							
						}
						
						
					},
					Scope: this
				});
			},
			zcQueryInsureTypeGroupList(type) {	// 套餐 险种
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_QueryInsureTypeGroupList',
						Data: {
							Category:type
						}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
                            
							let insureTraffics = [];
							let insureBizs = [];
							
							for (let i = 0; i < resjson.data.length; i++) {
								let item = {
									isCheck:true,	//是否选中
									title:resjson.data[i].InsureTypeName,	//险种名称
									isFreePay:resjson.data[i].IsFreePay,	//是否 不计免赔
									isShowFreePay:false,	//是否显示 不计免赔
									value:resjson.data[i].InsureAmountText,	//所选 保额
									isInsureAmount:false,	//是否有 保额
									isInsureAmountShow:true,	//是否显示 保额
									InputMethod:resjson.data[i].InputMethod,
									pickers:''	//保额数据
								}
								if (resjson.data[i].FreePayCode) {
									item.isShowFreePay = true;
								}
								if (resjson.data[i].PurchaseType) {
									item.isInsureAmount = true;
									if (resjson.data[i].PurchaseType.indexOf(',') != -1) {
										item.pickers = resjson.data[i].PurchaseType.split(',');
									}else {
										item.pickers = resjson.data[i].PurchaseType.split('，');
									}
									
								}
								if (resjson.data[i].InputMethod === '保费和保额选择') {
									item.value = item.pickers.indexOf(resjson.data[i].InsureAmountText);
								}
								if (resjson.data[i].InsureTypeCategory === '交强险') {
									insureTraffics.push(item);
								}else if (resjson.data[i].InsureTypeCategory === '商业险') {
									insureBizs.push(item);
								}
							}
							
							// 单交强、经济型、无忧型
							if (type === '单交强') {
								_this.saveInsures = resjson.data;
								
								if (insureTraffics.length > 0) {
									_this.insures.insure_traffic.isShow = true;
									_this.insures.insure_traffic.isCheck = true;
									_this.insures.insure_traffic.insureItems = insureTraffics;
								}
								if (insureBizs.length > 0) {
									_this.insures.insure_biz.isShow = true;
									_this.insures.insure_biz.isCheck = true;
									_this.insures.insure_biz.insureItems = insureBizs;
								}
								console.log('单交强 = ',_this.insures);
							}else if (type === '经济型') {
								_this.saveInsures1 = resjson.data;
								if (insureTraffics.length > 0) {
									_this.insures1.insure_traffic.isShow = true;
									_this.insures1.insure_traffic.isCheck = true;
									_this.insures1.insure_traffic.insureItems = insureTraffics;
								}
								if (insureBizs.length > 0) {
									_this.insures1.insure_biz.isShow = true;
									_this.insures1.insure_biz.isCheck = true;
									_this.insures1.insure_biz.insureItems = insureBizs;
								}
								console.log('经济型 = ',_this.insures1);
							}else if (type === '无忧型') {
								_this.saveInsures2 = resjson.data;
								if (insureTraffics.length > 0) {
									_this.insures2.insure_traffic.isShow = true;
									_this.insures2.insure_traffic.isCheck = true;
									_this.insures2.insure_traffic.insureItems = insureTraffics;
								}
								if (insureBizs.length > 0) {
									_this.insures2.insure_biz.isShow = true;
									_this.insures2.insure_biz.isCheck = true;
									_this.insures2.insure_biz.insureItems = insureBizs;
								}
								console.log('无忧型 = ',_this.insures2);
							}
						} else{
							
						}
						
					},
					Scope: this
				});
			},
			zcGetInsureOrder(SN) {	// 获取 保单详情接口
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_GetInsureOrder',
						Data: {
							VehicleInfoSN:SN
						}
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							console.log('保单 信息 = ',resjson.data);	// 处理 保单信息初始化
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
							
                            _this.VehicleInfoSN = resjson.data.VehicleInfoSN;	// 车辆信息SN
                            _this.VehicleIsNewCar = resjson.data.VehicleIsNewCar;	// 是否是 新车
                            if (resjson.data.VehiclePlateNo) {
                            	_this.VehiclePlateNo = resjson.data.VehiclePlateNo;		//车牌号
                            }
                            if (resjson.data.VehicleOwnerCity) {
                            	_this.VehicleOwnerCity = resjson.data.VehicleOwnerCity;		//车牌地区
                            }
                            
                            if (resjson.data.VehicleIsNewCar) {
                            	_this.items1[0].value = resjson.data.VehiclePlateNo;		//车牌号
                            }
                            _this.items1[1].value = resjson.data.VehicleVIN;		// 车架号
                            _this.items1[2].value = resjson.data.VehicleEngineNo;		//发动机号
                            _this.items1[3].value = resjson.data.VehicleRegistryDate;		//初等日期
                            if (resjson.data.VehicleBizType) {
                            	_this.picker1.index = _this.picker1.lists.indexOf(resjson.data.VehicleBizType);		//使用性质
                            }
                            if (resjson.data.VehiclePayType) {
                            	_this.picker4.index = _this.picker4.lists.indexOf(resjson.data.VehiclePayType);		//购车 方式
                            }
                            if (resjson.data.InsureRenewType) {
                            	_this.picker5.index = _this.picker5.lists.indexOf(resjson.data.InsureRenewType);		//转续保
                            }
                            if (resjson.data.VehicleTruckType) {
                            	_this.picker6.index = _this.picker6.lists.indexOf(resjson.data.VehicleTruckType);		//货车类型
                            }
                            if (resjson.data.IsShopRenew) {
                            	_this.optionBoxsItem1.value = resjson.data.IsShopRenew;		// 本店销售
                            	if (resjson.data.IsShopRenew == '本店新增' && resjson.data.VehicleRegType == '旧车') {
                            	   _this.picker7.isShow = true;
                                   if (resjson.data.ShopNewFrom) {
                                       _this.picker7.index = _this.picker7.lists.indexOf(resjson.data.ShopNewFrom);
                                   }
                            	}
                            }
                            if (resjson.data.IsInternetCar) {
                            	_this.optionBoxsItem2.value = resjson.data.IsInternetCar;		// 网约车类别
                            	if (resjson.data.IsInternetCar == '网约车') {
                            	   _this.picker8.isShow = true;
                                   if (resjson.data.InternetCarType) {
                                       _this.picker8.index = _this.picker8.lists.indexOf(resjson.data.InternetCarType);
                                   }
                            	}
                            }
                            
                            _this.items2[1].isShow = false;
                            _this.items2[0].value = resjson.data.VehicleRegType;		// 新/旧/过户车
                            if (resjson.data.VehicleRegType === '过户车') {
                            	
                            	_this.items2[1].isShow = true;
                            }
                            
                            if (resjson.data.VehicleRegTransferDate) {
                            	_this.items2[1].value = resjson.data.VehicleRegTransferDate;		//过户日期
                            }
                            if (resjson.data.VehicleOwnerType) {
                            	_this.items2[2].value = resjson.data.VehicleOwnerType;		//车主类别
                            }else {
                            	_this.items2[2].value = '个人';		//车主类别
                            }
                            
                            _this.items2[3].value = resjson.data.VehicleOwnerName;		//车主姓名
                            _this.items2[4].value = resjson.data.VehicleOwnerTelephone;		//车主 联系电话
                            _this.items2[5].value = resjson.data.CustomerOtherContacts;		//车主 其他联系方式
                            _this.items2[6].value = resjson.data.VehicleOwnerAddress;		//车主 详细地址
                            
                            _this.picker3.index = _this.picker3.lists.indexOf(resjson.data.VehicleOwnerCardType);		//车主证件类型
                            if (resjson.data.VehicleOwnerCardNo) {
                                _this.items3[0].value = resjson.data.VehicleOwnerCardNo;		// 车主 证件号
                                _this.items3[0].number = resjson.data.VehicleOwnerCardNo.length;
                            }
                            
                            //被保人不是车主
                            _this.isInsuredShow1 = resjson.data.InsureManIsOwner;
                            if (!resjson.data.InsureManIsOwner) {
                            	_this.zcItems4[0].value = resjson.data.InsureManName;	//被保人姓名
                            	_this.zcItems4[1].value = resjson.data.InsureManTelephone;	//被保人联系电话
                            	_this.zcItems4[2].value = _this.zcItems4[2].picker.valueOf(resjson.data.InsureManCardType);	//被保人证件类型
                            	_this.zcItems4[3].value = resjson.data.InsureManCardNo;	//被保人证件号
                            }else {
                                _this.zcItems4[0].value = resjson.data.VehicleOwnerName;	//被保人姓名
                                _this.zcItems4[1].value = resjson.data.VehicleOwnerTelephone;	//被保人联系电话
                                _this.zcItems4[2].value = _this.picker3.lists.indexOf(resjson.data.VehicleOwnerCardType);	//被保人证件类型
                                _this.zcItems4[3].value = resjson.data.VehicleOwnerCardNo;	//被保人证件号
                                _this.zcItems4[3].number = resjson.data.VehicleOwnerCardNo.length;	//被保人证件号
                            }
                            //投保人不是车主
                            _this.isInsuredShow = resjson.data.InsureHolderIsOwner;
                            if (!resjson.data.InsureHolderIsOwner) {	//投保人不是车主
                            	_this.items4[0].value = resjson.data.InsureHolderName;	//投保人姓名
                            	_this.items4[1].value = resjson.data.InsureHolderTelephone;	//投保人联系电话
                            	_this.items4[2].value = _this.items4[2].picker.valueOf(resjson.data.InsureHolderCardType);	//投保人证件类型
                            	_this.items4[3].value = resjson.data.InsureHolderCardNo;	//投保人证件号
                            }else{
                                _this.items4[0].value = resjson.data.VehicleOwnerName;	//投保人姓名
                                _this.items4[1].value = resjson.data.VehicleOwnerTelephone;	//投保人联系电话
                                _this.items4[2].value = _this.picker3.lists.indexOf(resjson.data.VehicleOwnerCardType);	//投保人证件类型
                                _this.items4[3].value = resjson.data.VehicleOwnerCardNo;	//投保人证件号
                                _this.items4[3].number = resjson.data.VehicleOwnerCardNo.length;	//投保人证件号
                            }
                            
							// 单交强、经济型、无忧型
							if (resjson.data.InsureTypeGroupCategory) {
								if (resjson.data.InsureTypeGroupCategory === '单交强') {
									_this.tabBar.tabIndex = 0;
									if (resjson.data.SN) {
										_this.SN = resjson.data.SN;
									}
									if (resjson.data.InsureTrafficItems) {
									   if (resjson.data.InsureTrafficItems.length > 0) {
									   	_this.insures.insure_traffic.isCheck = true;
									   	if (resjson.data.InsureTrafficStartDate) {
									   		_this.TCitems[0].value = resjson.data.InsureTrafficStartDate;
									   	}
									       _this.InsureTrafficComments = resjson.data.InsureTrafficComments;
									   } 
									}
									if (resjson.data.InsureBizItems) {
									   if (resjson.data.InsureBizItems.length > 0) {
									   	_this.insures.insure_biz.isCheck = true;
									   	if (resjson.data.InsureBizStartDate) {
									   		_this.TCitems[1].value = resjson.data.InsureBizStartDate;
									   	}
									       _this.InsureBizComments = resjson.data.InsureBizComments;
									       _this.InsureBizDiscount = resjson.data.InsureBizDiscount;
									   } 
									}
								}else if (resjson.data.InsureTypeGroupCategory === '经济型') {
									_this.tabBar.tabIndex = 1;
									if (resjson.data.SN) {
										_this.SN = resjson.data.SN;
									}
									if (resjson.data.InsureTrafficItems) {
									   if (resjson.data.InsureTrafficItems.length > 0) {
									   	_this.insures1.insure_traffic.isCheck = true;
									   	if (resjson.data.InsureTrafficStartDate) {
									   		_this.TCitems1[0].value = resjson.data.InsureTrafficStartDate;
									   	}
									       _this.InsureTrafficComments = resjson.data.InsureTrafficComments;
									   } 
									}
									if (resjson.data.InsureBizItems) {
									   if (resjson.data.InsureBizItems.length > 0) {
									   	_this.insures1.insure_biz.isCheck = true;
									   	if (resjson.data.InsureBizStartDate) {
									   		_this.TCitems1[1].value = resjson.data.InsureBizStartDate;
									   	}
									       _this.InsureBizComments = resjson.data.InsureBizComments;
									       _this.InsureBizDiscount = resjson.data.InsureBizDiscount;
									   } 
									}
								}else if (resjson.data.InsureTypeGroupCategory === '无忧型') {
									_this.tabBar.tabIndex = 2;
									if (resjson.data.SN) {
										_this.SN = resjson.data.SN;
									}
									if (resjson.data.InsureTrafficItems) {
									   if (resjson.data.InsureTrafficItems.length > 0) {
									   	_this.insures2.insure_traffic.isCheck = true;
									   	if (resjson.data.InsureTrafficStartDate) {
									   		_this.TCitems2[0].value = resjson.data.InsureTrafficStartDate;
									   	}
									       _this.InsureTrafficComments = resjson.data.InsureTrafficComments;
									   } 
									}
									if (resjson.data.InsureBizItems) {
									   if (resjson.data.InsureBizItems.length > 0) {
									   	_this.insures2.insure_biz.isCheck = true;
									   	if (resjson.data.InsureBizStartDate) {
									   		_this.TCitems2[1].value = resjson.data.InsureBizStartDate;
									   	}
									       _this.InsureBizComments = resjson.data.InsureBizComments;
									       _this.InsureBizDiscount = resjson.data.InsureBizDiscount;
									   } 
									}
								}else if (resjson.data.InsureTypeGroupCategory === '自定义') {
									_this.tabBar.tabIndex = 3;
									if (resjson.data.SN) {
										_this.SN = resjson.data.SN;
									}
									if (resjson.data.InsureTrafficItems) {
									   if (resjson.data.InsureTrafficItems.length > 0) {
									   	_this.insures3.insure_traffic.isCheck = true;
									   	if (resjson.data.InsureTrafficStartDate) {
									   		_this.items6[0].value = resjson.data.InsureTrafficStartDate;
									   	}
									       _this.InsureTrafficComments = resjson.data.InsureTrafficComments;
									   	for (let i = 0; i < resjson.data.InsureTrafficItems.length; i++) {
									   		if (_this.insures3.insure_traffic.insureItems && _this.insures3.insure_traffic.insureItems.length > 0) {
									   		   for (let j = 0; j < _this.insures3.insure_traffic.insureItems.length; j++) {
									   		   	if (resjson.data.InsureTrafficItems[i].InsureTypeName === _this.insures3.insure_traffic.insureItems[j].title) {
									   		   		_this.insures3.insure_traffic.insureItems[j].isCheck = true;
									   		   		_this.insures3.insure_traffic.insureItems[j].isFreePay = resjson.data.InsureTrafficItems[i].InsureTypeIsFreePay;	//是否 不计免赔
									   		   		_this.insures3.insure_traffic.insureItems[j].value = resjson.data.InsureTrafficItems[i].InsureAmountText;	//所选 保额
									   		   		_this.insures3.insure_traffic.insureItems[j].isInsureAmountShow = true;	//是否显示 保额
									   		   	}
									   		   } 
									   		}
									   	}
									   } 
									}
									if (resjson.data.InsureBizItems) {
									   if (resjson.data.InsureBizItems.length > 0) {
									   	_this.insures3.insure_biz.isCheck = true;
									       _this.doInitMore();
									   	if (resjson.data.InsureBizStartDate) {
									   		_this.items6[1].value = resjson.data.InsureBizStartDate;
									   	}
									       _this.InsureBizComments = resjson.data.InsureBizComments;
									       _this.InsureBizDiscount = resjson.data.InsureBizDiscount;
									   	for (let i = 0; i < resjson.data.InsureBizItems.length; i++) {
									   		if (_this.insures3.insure_biz.insureItems && _this.insures3.insure_biz.insureItems.length > 0) {
									   		   for (let j = 0; j < _this.insures3.insure_biz.insureItems.length; j++) {
									   		   	if (resjson.data.InsureBizItems[i].InsureTypeName === _this.insures3.insure_biz.insureItems[j].title) {
									   		   		_this.insures3.insure_biz.insureItems[j].isCheck = true;
									   		   		_this.insures3.insure_biz.insureItems[j].isFreePay = resjson.data.InsureBizItems[i].InsureTypeIsFreePay;	//是否 不计免赔
									   		   		_this.insures3.insure_biz.insureItems[j].value = resjson.data.InsureBizItems[i].InsureAmountText;	//所选 保额
									   		   		_this.insures3.insure_biz.insureItems[j].isInsureAmountShow = true;	//是否显示 保额
									   		   	}
									   		   } 
									   		}
									   	}
									   } 
									}
								}
								
							}
							
							// 初始化 标签
							_this.OrderLabel = [];
							if (resjson.data.Labels !== null && resjson.data.Labels.length > 0) {
								_this.OrderLabelInfo = resjson.data.Labels;
								
								for (let i = 0; i < resjson.data.Labels.length; i++) {
									if (resjson.data.Labels[i].childs !== null && resjson.data.Labels[i].childs.length > 0) {
										for (let j = 0; j < resjson.data.Labels[i].childs.length; j++) {
											let item = {
												title:resjson.data.Labels[i].childs[j].Name,
												Code:resjson.data.Labels[i].childs[j].Code,
												isShow:false,
												value:'',
												isDisabled:false,
												row:48,
												type:'audio',
												info:resjson.data.Labels[i].childs[j],
												actives:[],
												aValue:'',
												list:resjson.data.Labels[i].childs[j].childs
											}
											if (resjson.data.Labels[i].childs[j].sModel === '单选') {
												item.type = 'audio';
											}else if (resjson.data.Labels[i].childs[j].sModel === '多选') {
												item.type = 'checkbox';
											}
											if (resjson.data.Labels[i].childs[j].OnlyWrite) {
												item.isDisabled = true;
											}
											for (let s = 0; s < resjson.data.Labels[i].childs[j].childs.length; s++) {
												if (resjson.data.Labels[i].childs[j].childs[s].isS) {
													item.actives.push(s);
												}
											}
											for (let a = 0; a < item.actives.length; a++) {
												if (a === 0) {
													item.aValue = item.list[item.actives[a]].Name;
												}else {
													item.aValue = item.aValue +' , '+ item.list[item.actives[a]].Name;
												}
											}
											
											_this.OrderLabel.push(item);
											
											//  判断是否存在 二级标签
											for (let k = 0; k < resjson.data.Labels[i].childs[j].childs.length; k++) {
												
												if (resjson.data.Labels[i].childs[j].childs[k].oS !== null && resjson.data.Labels[i].childs[j].childs[k].isS && resjson.data.Labels[i].childs[j].childs[k].oS.length > 0) {
													
													for (let m = 0; m < resjson.data.Labels[i].childs[j].childs[k].oS.length; m++) {
														let item1 = {
															title:resjson.data.Labels[i].childs[j].childs[k].oS[m].Name,
															Code:resjson.data.Labels[i].childs[j].childs[k].oS[m].Code,
															isShow:false,
															value:resjson.data.Labels[i].childs[j].childs[k].Code,
															isDisabled:false,
															row:48,
															type:'audio',
															info:resjson.data.Labels[i].childs[j].childs[k].oS[m],
															actives:[],
															aValue:'',
															list:resjson.data.Labels[i].childs[j].childs[k].oS[m].childs
														}
														if (resjson.data.Labels[i].childs[j].childs[k].oS[m].sModel === '单选') {
															item1.type = 'audio';
														}else if (resjson.data.Labels[i].childs[j].childs[k].oS[m].sModel === '多选') {
															item1.type = 'checkbox';
														}
														if (resjson.data.Labels[i].childs[j].childs[k].oS[m].OnlyWrite) {
															item1.isDisabled = true;
														}
														for (let t = 0; t < resjson.data.Labels[i].childs[j].childs[k].oS[m].childs.length; t++) {
															if (resjson.data.Labels[i].childs[j].childs[k].oS[m].childs[t].isS) {
																item1.actives.push(t);
															}
														}
														for (let a = 0; a < item1.actives.length; a++) {
															if (a === 0) {
																item1.aValue = item1.list[item1.actives[a]].Name;
															}else {
																item1.aValue = item1.aValue +' , '+ item1.list[item1.actives[a]].Name;
															}
														}
														
														_this.OrderLabel.push(item1);
													}
													
												}
												// if (resjson.data.Labels[i].childs[j].childs[k].isS) {
												// 	_this.items3[_this.items3.length-1].actives.push(k)
												// }
											}
											
										}
									}
								}
							}
							
							
							
						}
                        if (resjson.state === 'end') {
                            uni.hideLoading();
                        }
						
					},
					Scope: this
				})
				
			},
			//  ----- END ---------
			
			//  下一步 操作处理函数
			zcNextStep() {
				if (!_this.items1[1].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入车架号！',showCancel: false});return;};
				if (!_this.items1[2].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入发动机号！',showCancel: false});return;};
				if (!_this.items1[3].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入初登日期！',showCancel: false});return;};
				if (!_this.items2[3].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入车主姓名！',showCancel: false});return;};
				if (!_this.items2[4].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入联系电话！',showCancel: false});return;};
				if (!_this.items3[0].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入证件号！',showCancel: false});return;};
				
                if ((_this.picker3.lists[_this.picker3.index] == '身份证') || (_this.picker3.lists[_this.picker3.index] == '统一信用代码')) {
                    if (_this.items3[0].value.length != 18) {
                       uni.showModal({title: '温馨提示',content: '尊敬的用户,身份证、统一信用代码类型的证件号必须为18位！',showCancel: false});return; 
                    }
                };
				if (!_this.items2[6].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入详细地址！',showCancel: false});return;};
                if (_this.items2[6].value.length<7) {uni.showModal({title: '温馨提示',content: '尊敬的用户,您输入的详细地址不能少于7位！',showCancel: false});return;};
                
                
				let InsureOrder = {
					SN : _this.SN,	//保单SN
					VehiclePlateNo : _this.items1[0].value,	//车牌号
					VehicleVIN : _this.items1[1].value,	// 车架号
					VehicleEngineNo : _this.items1[2].value,	//发动机号
					VehicleRegistryDate : _this.items1[3].value,	//初等日期
					VehicleBizType : _this.picker1.lists[_this.picker1.index],	//使用性质
                    VehiclePayType : _this.picker4.lists[_this.picker4.index],	//购车付款方式
                    InsureRenewType : _this.picker5.lists[_this.picker5.index],	//转续保
                    VehicleTruckType : _this.picker6.lists[_this.picker6.index],	//货车类型
                    IsShopRenew : _this.optionBoxsItem1.value,	//本店销售
                    IsInternetCar :_this.optionBoxsItem2.value,	//网约车类型
					VehicleRegType : _this.items2[0].value,	// 新/旧/过户车
					VehicleRegTransferDate : _this.items2[1].value,	//过户日期
					VehicleOwnerType : _this.items2[2].value,	//车主类别
					VehicleOwnerName : _this.items2[3].value,	//车主姓名
					VehicleOwnerTelephone : _this.items2[4].value,	//车主联系电话
					CustomerOtherContacts : _this.items2[5].value,	// 客户其他联系方式
                    VehicleOwnerAddress : _this.items2[6].value,	// 车主详细地址
					VehicleOwnerCardType : _this.picker3.lists[_this.picker3.index],	//证件类型
					VehicleOwnerCardNo : _this.items3[0].value,	//车主 证件号
					InsureManIsOwner : _this.isInsuredShow1,	//被保人是否是同车主
					InsureHolderIsOwner : _this.isInsuredShow,	//投保人是否是同车主
					InsureTrafficComments: '', //交强险备注
                    InsureBizComments: '', //商业险备注
                    InsureBizDiscount: 0, //商业险折扣
                    
					VehicleInfoSN : _this.VehicleInfoSN,	//车辆信息SN
					Category :'',	// 套餐类别
				}
                
                if (!InsureOrder.VehicleBizType) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择使用性质！',showCancel: false});return;};
                if (!InsureOrder.VehiclePayType) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择购车付款方式！',showCancel: false});return;};
                if (!InsureOrder.InsureRenewType) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择转续保！',showCancel: false});return;};
                if (!InsureOrder.VehicleTruckType) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择货车类型！',showCancel: false});return;};
                if (!InsureOrder.IsInternetCar) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择网约车类别！',showCancel: false});return;};
                
				if (_this.VehicleIsNewCar) {
					InsureOrder.VehiclePlateNo = _this.items1[0].value;	//车牌号
				}else {
					InsureOrder.VehiclePlateNo = _this.VehiclePlateNo;	//车牌号
				}
                if (InsureOrder.IsShopRenew == '本店新增') {
                    InsureOrder.ShopNewFrom = _this.picker7.lists[_this.picker7.index];	//本店新增
                    if (!InsureOrder.ShopNewFrom) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择本店新增类型！',showCancel: false});return;};
                }
                if (InsureOrder.IsInternetCar == '网约车') {
                    InsureOrder.InternetCarType = _this.picker8.lists[_this.picker8.index];	//网约车
                    if (!InsureOrder.InternetCarType) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请选择网约车类型！',showCancel: false});return;};
                }
				//被保人不是车主
				if (!InsureOrder.InsureManIsOwner) {
					if (!_this.zcItems4[0].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入被保人姓名！',showCancel: false});return;};
					if (!_this.zcItems4[1].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入被保人联系电话！',showCancel: false});return;};
					if (!_this.zcItems4[3].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入被保人证件号！',showCancel: false});return;};
				}
                InsureOrder.InsureManName = _this.zcItems4[0].value;	//被保人姓名
                InsureOrder.InsureManTelephone = _this.zcItems4[1].value;	//被保人联系电话
                InsureOrder.InsureManCardType = _this.zcItems4[2].picker[_this.zcItems4[2].value];	//被保人证件类型
                InsureOrder.InsureManCardNo = _this.zcItems4[3].value;	//被保人证件号
				//投保人不是车主
				if (!InsureOrder.InsureHolderIsOwner) {	//投保人不是车主
					if (!_this.items4[0].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入投保人姓名！',showCancel: false});return;};
					if (!_this.items4[1].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入投保人联系电话！',showCancel: false});return;};
					if (!_this.items4[3].value) {uni.showModal({title: '温馨提示',content: '尊敬的用户,请输入投保人证件号！',showCancel: false});return;};
				}
                InsureOrder.InsureHolderName = _this.items4[0].value;	//投保人姓名
                InsureOrder.InsureHolderTelephone = _this.items4[1].value;	//投保人联系电话
                InsureOrder.InsureHolderCardType = _this.items4[2].picker[0];	//投保人证件类型
                InsureOrder.InsureHolderCardNo = _this.items4[3].value;	//投保人证件号
				
				//  订单标签 保存信息
				InsureOrder.SaveLabels = [];
				for (let i = 0; i < _this.OrderLabel.length; i++) {
					if (_this.OrderLabel[i].actives.length > 0) {
						for (let k = 0; k < _this.OrderLabel[i].actives.length; k++) {
							let item = _this.OrderLabel[i].list[_this.OrderLabel[i].actives[k]].SN;
							InsureOrder.SaveLabels.push(item);
						}
					}
				}
                
				
				//  获取险种数据
				if (_this.tabBar.tabIndex === 0) {
					if (!_this.TCitems[0].value && _this.insures.insure_traffic.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择交强险起期！',
							showCancel:false
						})
						return
					}
					if (!_this.TCitems[1].value && _this.insures.insure_biz.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择商业险起期！',
							showCancel:false
						})
						return
					}
					InsureOrder.InsureTrafficStartDate = _this.TCitems[0].value;		// 交强险起期
					InsureOrder.InsureBizStartDate = _this.TCitems[1].value;		// 商业险起期
                    InsureOrder.InsureTrafficEndDate = _this.countYearAndDay(_this.TCitems[0].value);		// 交强险结束期
                    InsureOrder.InsureBizEndDate = _this.countYearAndDay(_this.TCitems[1].value);		// 商业险结束期
					
					// 是否选中 交强险
					if (_this.insures.insure_traffic.isShow) {
						InsureOrder.InsureTrafficSelected = _this.insures.insure_traffic.isCheck;	
                        InsureOrder.InsureTrafficComments = _this.InsureTrafficComments;
					}
					// 是否选中 商业险
					if (_this.insures.insure_biz.isShow) {
						InsureOrder.InsureBizSelected = _this.insures.insure_biz.isCheck;	
                        InsureOrder.InsureBizComments = _this.InsureBizComments;
                        InsureOrder.InsureBizDiscount = _this.InsureBizDiscount;
                        if (!_this.InsureBizDiscount) {
                            InsureOrder.InsureBizDiscount = 0
                        }
					}
					
					InsureOrder.InsureTrafficItems = [];
					InsureOrder.InsureBizItems = [];
					for (let i = 0; i < _this.saveInsures.length; i++) {
						let insureItem = {
							Category : _this.saveInsures[i].Category,	// 套餐类别
							InsureTypeCategory : _this.saveInsures[i].InsureTypeCategory,	//险种类别
							InsureTypeSN : _this.saveInsures[i].InsureTypeSN,	//险种SN
							InsureTypeName : _this.saveInsures[i].InsureTypeName,	//险种名称
							InsureTypeIsFreePay : _this.saveInsures[i].IsFreePay,	//是否不计免赔
							InsureAmountText : _this.saveInsures[i].InsureAmountText,	//险种保额
							InsureTypeCode : _this.saveInsures[i].FreePayCode,	//险种编码
							InsureTypeFreePayCode : _this.saveInsures[i].FreePayCode	//不计免赔编码
						}
						InsureOrder.Category = _this.saveInsures[i].Category;
						
						if (_this.saveInsures[i].InsureTypeCategory === '交强险') {
							InsureOrder.InsureTrafficItems.push(insureItem);
						}else if (_this.saveInsures[i].InsureTypeCategory === '商业险') {
							InsureOrder.InsureBizItems.push(insureItem);
						}
					}
				}else if (_this.tabBar.tabIndex === 1) {
					if (!_this.TCitems1[0].value && _this.insures1.insure_traffic.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择交强险起期！',
							showCancel:false
						})
						return
					}
					if (!_this.TCitems1[1].value && _this.insures1.insure_biz.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择商业险起期！',
							showCancel:false
						})
						return
					}
					InsureOrder.InsureTrafficStartDate = _this.TCitems1[0].value;		// 交强险起期
					InsureOrder.InsureBizStartDate = _this.TCitems1[1].value;		// 交强险起期
                    InsureOrder.InsureTrafficEndDate = _this.countYearAndDay(_this.TCitems1[0].value);		// 交强险结束期
                    InsureOrder.InsureBizEndDate = _this.countYearAndDay(_this.TCitems1[1].value);		// 商业险结束期
					
					// 是否选中 交强险
					if (_this.insures1.insure_traffic.isShow) {
						InsureOrder.InsureTrafficSelected = _this.insures1.insure_traffic.isCheck;
                        InsureOrder.InsureTrafficComments = _this.InsureTrafficComments;
					}
					// 是否选中 商业险
					if (_this.insures1.insure_biz.isShow) {
						InsureOrder.InsureBizSelected = _this.insures1.insure_biz.isCheck;	
                        InsureOrder.InsureBizComments = _this.InsureBizComments;
                        InsureOrder.InsureBizDiscount = _this.InsureBizDiscount;
                        if (!_this.InsureBizDiscount) {
                            InsureOrder.InsureBizDiscount = 0
                        }
					}
					
					InsureOrder.InsureTrafficItems = [];
					InsureOrder.InsureBizItems = [];
					for (let i = 0; i < _this.saveInsures1.length; i++) {
						let insureItem = {
							Category : _this.saveInsures1[i].Category,	// 套餐类别
							InsureTypeCategory : _this.saveInsures1[i].InsureTypeCategory,	//险种类别
							InsureTypeSN : _this.saveInsures1[i].InsureTypeSN,	//险种SN
							InsureTypeName : _this.saveInsures1[i].InsureTypeName,	//险种名称
							InsureTypeIsFreePay : _this.saveInsures1[i].IsFreePay,	//是否不计免赔
							InsureAmountText : _this.saveInsures1[i].InsureAmountText,	//险种保额
							InsureTypeCode : _this.saveInsures1[i].FreePayCode,	//险种编码
							InsureTypeFreePayCode : _this.saveInsures1[i].FreePayCode	//不计免赔编码
						}
						InsureOrder.Category = _this.saveInsures1[i].Category;
						
						if (_this.saveInsures1[i].InsureTypeCategory === '交强险') {
							InsureOrder.InsureTrafficItems.push(insureItem);
						}else if (_this.saveInsures1[i].InsureTypeCategory === '商业险') {
							InsureOrder.InsureBizItems.push(insureItem);
						}
					}
				}else if (_this.tabBar.tabIndex === 2) {
					if (!_this.TCitems2[0].value && _this.insures2.insure_traffic.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择交强险起期！',
							showCancel:false
						})
						return
					}
					if (!_this.TCitems2[1].value && _this.insures2.insure_biz.isShow) {
						uni.showModal({
							title:'温馨提示',
							content:'请选择商业险起期！',
							showCancel:false
						})
						return
					}
					InsureOrder.InsureTrafficStartDate = _this.TCitems2[0].value;		// 交强险起期
					InsureOrder.InsureBizStartDate = _this.TCitems2[1].value;		// 交强险起期
                    InsureOrder.InsureTrafficEndDate = _this.countYearAndDay(_this.TCitems2[0].value);		// 交强险结束期
                    InsureOrder.InsureBizEndDate = _this.countYearAndDay(_this.TCitems2[1].value);		// 商业险结束期
					
					// 是否选中 交强险
					if (_this.insures2.insure_traffic.isShow) {
						InsureOrder.InsureTrafficSelected = _this.insures2.insure_traffic.isCheck;
                        InsureOrder.InsureTrafficComments = _this.InsureTrafficComments;
					}
					// 是否选中 商业险
					if (_this.insures2.insure_biz.isShow) {
						InsureOrder.InsureBizSelected = _this.insures2.insure_biz.isCheck;	
                        InsureOrder.InsureBizComments = _this.InsureBizComments;
                        InsureOrder.InsureBizDiscount = _this.InsureBizDiscount;
                        if (!_this.InsureBizDiscount) {
                            InsureOrder.InsureBizDiscount = 0
                        }
					}
					
					InsureOrder.InsureTrafficItems = [];
					InsureOrder.InsureBizItems = [];
					for (let i = 0; i < _this.saveInsures2.length; i++) {
						let insureItem = {
							Category : _this.saveInsures2[i].Category,	// 套餐类别
							InsureTypeCategory : _this.saveInsures2[i].InsureTypeCategory,	//险种类别
							InsureTypeSN : _this.saveInsures2[i].InsureTypeSN,	//险种SN
							InsureTypeName : _this.saveInsures2[i].InsureTypeName,	//险种名称
							InsureTypeIsFreePay : _this.saveInsures2[i].IsFreePay,	//是否不计免赔
							InsureAmountText : _this.saveInsures2[i].InsureAmountText,	//险种保额
							InsureTypeCode : _this.saveInsures2[i].FreePayCode,	//险种编码
							InsureTypeFreePayCode : _this.saveInsures2[i].FreePayCode	//不计免赔编码
						}
						InsureOrder.Category = _this.saveInsures2[i].Category;
						
						if (_this.saveInsures2[i].InsureTypeCategory === '交强险') {
							InsureOrder.InsureTrafficItems.push(insureItem);
						}else if (_this.saveInsures2[i].InsureTypeCategory === '商业险') {
							InsureOrder.InsureBizItems.push(insureItem);
						}
					}
				}else if (_this.tabBar.tabIndex === 3) {	//自定义 险种
					InsureOrder.Category = "自定义";
				
					InsureOrder.InsureTrafficSelected = _this.insures3.insure_traffic.isCheck;	// 是否选中 交强险
                    if (_this.insures3.insure_traffic.isCheck) {
                        InsureOrder.InsureTrafficComments = _this.InsureTrafficComments;
                    }
                    
					if (!_this.items6[0].value && _this.insures3.insure_traffic.isCheck) {
						uni.showModal({
							title:'温馨提示',
							content:'尊敬的用户，请选择交强险起期！',
							showCancel:false
						})
						return
					}
					if (!_this.items6[1].value && _this.insures3.insure_biz.isCheck) {
						uni.showModal({
							title:'温馨提示',
							content:'尊敬的用户，请选择商业险起期！',
							showCancel:false
						})
						return
					}
					InsureOrder.InsureTrafficStartDate = _this.items6[0].value;		// 交强险起期
                    InsureOrder.InsureTrafficEndDate = _this.countYearAndDay(_this.items6[0].value);		// 交强险结束期
                    
					InsureOrder.InsureTrafficItems = [];
					for (let i = 0; i < _this.insures3.insure_traffic.insureItems.length; i++) {
						let insureItem = {
							InsureTypeCategory : _this.saveInsures3.InsureTrafficItems[i].Category,	//险种类别
							InsureTypeSN : _this.saveInsures3.InsureTrafficItems[i].SN,	//险种SN
							InsureTypeName : _this.saveInsures3.InsureTrafficItems[i].Name,	//险种名称
							InsureTypeIsFreePay : _this.insures3.insure_traffic.insureItems[i].isFreePay,	//是否不计免赔
							InsureAmountText : _this.insures3.insure_traffic.insureItems[i].value,	//险种保额
							InsureTypeCode : _this.saveInsures3.InsureTrafficItems[i].Code,	//险种编码
							InsureTypeFreePayCode : _this.saveInsures3.InsureTrafficItems[i].FreePayCode	//不计免赔编码
						}
						
						if (_this.insures3.insure_traffic.isCheck && _this.insures3.insure_traffic.insureItems[i].isCheck) {
							InsureOrder.InsureTrafficItems.push(insureItem);
						}
					}
					
					InsureOrder.InsureBizSelected = _this.insures3.insure_biz.isCheck;	// 是否选中 商业险
                    if (_this.insures3.insure_biz.isCheck) {
                        InsureOrder.InsureBizComments = _this.InsureBizComments;
                        InsureOrder.InsureBizDiscount = _this.InsureBizDiscount;
                        if (!_this.InsureBizDiscount) {
                            InsureOrder.InsureBizDiscount = 0
                        }
                    }
                    console.log('险期 -- ',_this.items6[1].value);
					InsureOrder.InsureBizStartDate = _this.items6[1].value;		// 商业险起期
                    InsureOrder.InsureBizEndDate = _this.countYearAndDay(_this.items6[1].value);		// 商业险结束期
                    
					InsureOrder.InsureBizItems = [];
					for (let i = 0; i < _this.insures3.insure_biz.insureItems.length; i++) {
						let insureItem = {
							InsureTypeCategory : _this.saveInsures3.InsureBizItems[i].Category,	//险种类别
							InsureTypeSN : _this.saveInsures3.InsureBizItems[i].SN,	//险种SN
							InsureTypeName : _this.saveInsures3.InsureBizItems[i].Name,	//险种名称
							InsureTypeIsFreePay : _this.insures3.insure_biz.insureItems[i].isFreePay,	//是否不计免赔
							InsureAmountText : _this.insures3.insure_biz.insureItems[i].value,	//险种保额
							InsureTypeCode : _this.saveInsures3.InsureBizItems[i].Code,	//险种编码
							InsureTypeFreePayCode : _this.saveInsures3.InsureBizItems[i].FreePayCode	//不计免赔编码
						}
						
						if (_this.insures3.insure_biz.isCheck && _this.insures3.insure_biz.insureItems[i].isCheck) {
							InsureOrder.InsureBizItems.push(insureItem);
						}
					}
					
				}
				
				if (InsureOrder.InsureTrafficItems.length < 1  && InsureOrder.InsureBizItems.length < 1) {
					uni.showModal({
						title:'温馨提示',
						content:'尊敬的用户，请选择至少一个保险险种！',
						showCancel:false
					})
					return
				}
				
				console.log('保单保存信息 = ',InsureOrder);
				// return;
				_this.$ZcPublic.Server.Post({
					IsNeedLogin: true,
					Paras: {
						Name: 'uni_Insure_Detail',
						Action: 'Ext_SaveInsureOrder4Line',
						Data: InsureOrder
					},
					Callback:function(resjson,scope) {
						if (resjson.state === 'back') {
							console.log('保单保存 成功 = ',resjson.data);
							if (!resjson.success) {
								uni.showModal({
									title:'温馨提示',
									showCancel:false,
									content:''+resjson.msg
								})
								return;
							}
							
							uni.navigateTo({
								url: '../insurePrice_carType/insurePrice_carType?InsureOrderSN='+resjson.data.SN
							});
						} else{
							
						}
					},
					Scope: this
				});
				
				
			}
			// ------------------
			
		}
	}
</script>

<style>
	.zcModel-card-item{background-color: #FFFFFF;padding: 20upx;box-sizing: border-box;}
	.zcModel-card-item view{display: flex;box-sizing: border-box;color: #3CA4FA;font-size: 28upx;}
	
	.card_item_name>view{line-height: 1!important;}
	.card_item_text{position: relative;}
	picker{position: relative;z-index: 6;}
	.card_item_text>input{text-align: right;}
	.card_item_text>view{font-weight: 500;position: absolute;right: 0;}
	.card_item_text>textarea{height: 80upx!important;}
	.zcModel-title{font-size: 28upx;padding: 20upx;font-weight: 500;display: flex;color: #999999;}
	.zcModel-title>view{font-size: 28upx;font-weight: 500;}
	.icon-bianji:before{
		margin-right: 16upx;
	}
	.icon-calendar:before{
		color: #3CA4FA;
	}
	.icon-sanjiaojiantoutriangular-copy-after:after{
		content: "\e600";
		font-weight: bold;
		position: absolute;
		right: 0;
		z-index: 0;
	}
	
	.zcPicker-model{background-color: #FFFFFF;padding: 20upx;border-bottom: 3px solid #F8F8F8;position: relative;}
	.zcPicker-titel{display: flex;flex-shrink: 0;width: 30%;font-size: 28upx;}
	.zcPicker-model-item{display: flex;flex: 1;height: 100%;align-items: center;}
	.zcPicker-model-item picker{width: 100%;height: 100%;font-size: 28upx;background-color: rgba(255,255,255,0.1);position: relative;z-index: 6;}
	.uni-input{text-align: center;font-size: 28upx;background-color: rgba(255,255,255,0.1);padding: 0 35upx;text-align: right;}
	
	
	radio-group label{display: flex;align-items: center;padding: 0;flex-shrink: 0;}
	checkbox-group{display: flex;justify-content: center;}
	checkbox-group label{font-size: 28upx;}
	radio-group label radio,checkbox-group label checkbox{margin-left: 20upx;}
	.zcPicker-model checkbox-group{justify-content: flex-end;padding-right: 60upx;}
	
	.insured-model .card_item{padding: 10upx 40upx!important;border-bottom: none!important;}
	.insured-model .card_item .card_item_text>input,.insured-model .uni-input{text-align: left;background-color: rgba(255,255,255,0.1);padding-right: 80upx;padding-left: 0;}
	.insured-model .card_item .card_item_text{position: relative;flex: none;}
	.insured-model .card_item .card_item_text>picker{width: 300upx;}
	.insured-model .card_item .card_item_text>picker .uni-input{position: relative;z-index: 6;}
	.insured-model .card_item .card_item_text>picker:after{
		font-family: "iconfont" !important;
		font-size: 28upx;
		font-style: normal;
		font-weight: bold;
		position: absolute;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		content: '\e600';
		top: 0;
		right: 20upx;
		/* margin-top: 10upx; */
	}

	.zctab-bar-box{
		width: 100%;
		/* height: 100%; */
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.zcUni-tab-bar{
		width: 100%;
		flex: 1;
		/* height: 100%; */
		/* background-color: #FFFFFF; */
		overflow: inherit;
		/* position: relative; */
		display: flex;
	}
	/* tab-bar{margin-bottom: 20upx;} */
	.uni-swiper-tab{margin: 20upx 0;}
	.swiper-tab-list{font-size: 28upx!important;}
	
	.zc-tab-bar{
		overflow: hidden;
		display: block;
		will-change:transform;
		transition: all 0.4S ease-in;
		width: 100%;
		/* height: 100%; */
		/* position: absolute; */
		background-color: #FFFFFF;
		/* margin-bottom: 100upx; */
	}
	.zc-tab-bar>view{padding: 20upx;}
	.zc-tab-bar>view>view{font-size: 28upx;}
	radio .wx-radio-input{border-radius: 20%;}
	.zc-tab-bar checkbox .wx-checkbox-input{border-radius: 100%;}
	checkbox .wx-checkbox-input.wx-checkbox-input-checked{background-color: #3CA4FA!important;}
	.zc-tab-bar checkbox-group{justify-content: flex-end;width: inherit;position: relative;z-index: 10;}
	.zc-tab-bar checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{color: #FFFFFF!important;}
	.zc-tab-bar .card_item{border: none!important;padding: 0!important;}
	.zc-tab-bar zc-card{flex: 1;}
	.zc-tab-bar .checkbox{padding: 0!important;}.zc-tab-bar .checkbox checkbox{margin: 0!important;}
	
	.zcLabel{padding: 0 10upx;border-radius: 16upx;border: 2upx solid #C5C5C5;color: #C5C5C5;}
	.zcLabelActive{border-color:#3CA4FA;color: #3CA4FA;}
	
	.zc-tab-bar .uni-input{text-align: right;background-color: rgba(255,255,255,0.1);padding-right: 40upx;}
    
	/* 标签 */
	.popup_content{
		display: flex;
		flex-wrap: wrap;
		padding: 10upx 20upx;
		flex-direction: row;
		background-color: #FFFFFF;
	}
	.popup_item{
		display: flex;
		float: left;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		flex-shrink: 0;
		border: 1px solid #999999;
		color: #999999;
		margin: 10upx 1%;
		height: 52upx;
		border-radius: 52upx;
		box-sizing: border-box;
	}
	.active{border-color: #26a6ff;color: #26a6ff;}
	/* ----END----- */
	
	/* 险种样式 */
	.zcBizStyle{display: flex;border-top: 30upx solid #F5F5F5;}
	.zcBizStyle input{display: flex;flex: 1;position: absolute;right: 0;margin-left: 35upx;margin-right: 50upx;border-bottom: 1px solid #999999;}
	.zcBizStyle .uni-input{text-align: center;}
	/* 险种备注样式 */
	.zcModel-card-item-text{white-space: normal;display: block;min-height: 50rpx;line-height: 1.2!important;}
	.zcModel-card-item-stext{width:100%;height: 100%;min-height: 50rpx;line-height: 1.2!important;font-weight: normal;font-size: 30upx;color: #333333!important;}
    .zcModel-card-item-stext input {text-align: center;}
	.zcModel-card-item textarea{line-height: 1.2;flex: 1;min-height: 50rpx;overflow: hidden;font-size: 28upx!important;}
	
    /* 险种更多样式 */
    .icon-Order-Details-SeeMore{transform: rotate(0deg);transition: 0.5s;}
    .icon-Order-Details-SeeMore:after{
    	content: "\e6d6";
    }
    .moreBox{position: relative;overflow: hidden;padding: 0;transition: height 1s ease;}
    
	.zcFooter-but{position: fixed;bottom: 0;left: 0;width: 100%;z-index: 10;background-color: #F4F5F6!important;}
	.zcFooter-but button:first-child{flex: 1;border: 2upx solid #3CA4FA;color: #3CA4FA;border-radius: 0;font-size: 32upx;}
	.zcFooter-but button:last-child{flex: 1;background-color: rgba(60, 164, 250, 1);color: #FFFFFF;border-radius: 0;font-size: 32upx;}
	.zcFooter-but .button-hover:last-child{color: rgba(250, 250, 250, 0.6);background-color: rgba(60, 164, 250, 0.6)!important;}
</style>
